public final class FolderFontSource extends Object implements FontSource, com.aspose.ms.System.IEquatable<FolderFontSource>
The FolderFontSource class is used to specify a folder location that contains TrueType fonts. It allows the GroupDocs.Viewer API to access the fonts stored in the specified folder for document rendering purposes.
Example usage:
FontSettings.setFontSources(new FolderFontSource("/path/to/fonts/folder", SearchOption.ALL_FOLDERS));
FontSource,
FontSettings| Constructor and Description |
|---|
FolderFontSource(String folderPath,
SearchOption searchOption)
Initializes a new instance of the
FolderFontSource class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(FolderFontSource other)
Determines whether the current
FolderFontSource is the same as the specified FolderFontSource object. |
boolean |
equals(Object o)
Determines whether the current
FolderFontSource is the same as the specified object. |
String |
getFolderPath()
Gets the path to the folder that contains TrueType fonts.
|
SearchOption |
getSearchOption()
Gets the search option that specifies whether to search the current folder, or the current folder and all subfolders.
|
int |
hashCode()
Returns the hash code for the current
FolderFontSource object. |
static boolean |
isEqualTo(FolderFontSource left,
FolderFontSource right)
Determines whether two
FolderFontSource objects are the same. |
static boolean |
isNotEqualTo(FolderFontSource left,
FolderFontSource right)
Determines whether two
FolderFontSource objects are not the same. |
boolean |
isRecursive()
Checks if the fonts would be searched recursively.
|
String |
toString()
Returns a string that represents the current object.
|
public FolderFontSource(String folderPath, SearchOption searchOption)
Initializes a new instance of the FolderFontSource class.
folderPath - Path to the folder that contains TrueType fonts.searchOption - Specifies whether to search the current folder, or the current folder and all sub-folders.IllegalArgumentException - Thrown when folderPath is null.FileNotFoundException - Thrown when the path specified in folderPath can't be located.public boolean equals(FolderFontSource other)
Determines whether the current FolderFontSource is the same as the specified FolderFontSource object.
other - The object to compare with the current FolderFontSource object.true if both FolderFontSource objects are the same; otherwise, falsepublic boolean equals(Object o)
Determines whether the current FolderFontSource is the same as the specified object.
equals in interface com.aspose.ms.System.IEquatable<FolderFontSource>equals in class Objecto - The object to compare with the current FolderFontSource object.true if the obj parameter is of type FolderFontSource and is the same as the current FolderFontSource object; otherwise, falsepublic String getFolderPath()
Gets the path to the folder that contains TrueType fonts.
public SearchOption getSearchOption()
Gets the search option that specifies whether to search the current folder, or the current folder and all subfolders.
public int hashCode()
Returns the hash code for the current FolderFontSource object.
public static boolean isEqualTo(FolderFontSource left, FolderFontSource right)
Determines whether two FolderFontSource objects are the same.
left - The left FolderFontSource object.right - The right FolderFontSource object.true if both FolderFontSource objects are the same; otherwise, false.public static boolean isNotEqualTo(FolderFontSource left, FolderFontSource right)
Determines whether two FolderFontSource objects are not the same.
left - The left FolderFontSource object.right - The right FolderFontSource object.true if both FolderFontSource objects are not the same; otherwise, false.public boolean isRecursive()
Checks if the fonts would be searched recursively.
true if the fonts would be searched recursively, false otherwise.Copyright © 2025. All rights reserved.