FolderFontSource
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.viewer.fonts.FontSource, com.aspose.ms.System.IEquatable
public final class FolderFontSource implements FontSource, System.IEquatable<FolderFontSource>
Represents a folder that contains TrueType fonts.
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));
| Constructor | Description |
|---|---|
| FolderFontSource(String folderPath, SearchOption searchOption) | Initializes a new instance of the FolderFontSource class. |
| Method | Description |
|---|---|
| isEqualTo(FolderFontSource left, FolderFontSource right) | Determines whether two FolderFontSource objects are the same. |
| isNotEqualTo(FolderFontSource left, FolderFontSource right) | Determines whether two FolderFontSource objects are not the same. |
| getFolderPath() | Gets the path to the folder that contains TrueType fonts. |
| getSearchOption() | Gets the search option that specifies whether to search the current folder, or the current folder and all subfolders. |
| isRecursive() | Checks if the fonts would be searched recursively. |
| equals(FolderFontSource other) | Determines whether the current FolderFontSource is the same as the specified FolderFontSource object. |
| equals(Object o) | Determines whether the current FolderFontSource is the same as the specified object. |
| hashCode() | Returns the hash code for the current FolderFontSource object. |
| toString() | Returns a string that represents the current object. |
public FolderFontSource(String folderPath, SearchOption searchOption)
Initializes a new instance of the FolderFontSource class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| folderPath | java.lang.String | Path to the folder that contains TrueType fonts. |
| searchOption | SearchOption | Specifies whether to search the current folder, or the current folder and all sub-folders. |
public static boolean isEqualTo(FolderFontSource left, FolderFontSource right)
Determines whether two FolderFontSource objects are the same.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | FolderFontSource | The left FolderFontSource object. |
| right | FolderFontSource | The right FolderFontSource object. |
Returns: boolean - 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.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | FolderFontSource | The left FolderFontSource object. |
| right | FolderFontSource | The right FolderFontSource object. |
Returns: boolean - true if both FolderFontSource objects are not the same; otherwise, false .
public String getFolderPath()
Gets the path to the folder that contains TrueType fonts.
Returns: java.lang.String - 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.
Returns: SearchOption - the search option.
public boolean isRecursive()
Checks if the fonts would be searched recursively.
Returns: boolean - true if the fonts would be searched recursively, false otherwise.
public boolean equals(FolderFontSource other)
Determines whether the current FolderFontSource is the same as the specified FolderFontSource object.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | FolderFontSource | The object to compare with the current FolderFontSource object. |
Returns: boolean - true if both FolderFontSource objects are the same; otherwise, false
public boolean equals(Object o)
Determines whether the current FolderFontSource is the same as the specified object.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| o | java.lang.Object | The object to compare with the current FolderFontSource object. |
Returns: boolean - true if the obj parameter is of type FolderFontSource and is the same as the current FolderFontSource object; otherwise, false
public int hashCode()
Returns the hash code for the current FolderFontSource object.
Returns: int - a hash code for the current FolderFontSource object.
public String toString()
Returns a string that represents the current object.
Returns: java.lang.String - a string that represents the current object.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.