FolderFontSource

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));
 

Constructors

Constructor Description
FolderFontSource(String folderPath, SearchOption searchOption) Initializes a new instance of the FolderFontSource class.

Methods

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.

FolderFontSource(String folderPath, SearchOption searchOption)

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.

isEqualTo(FolderFontSource left, FolderFontSource right)

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 .

isNotEqualTo(FolderFontSource left, FolderFontSource right)

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 .

getFolderPath()

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.

getSearchOption()

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.

isRecursive()

public boolean isRecursive()

Checks if the fonts would be searched recursively.

Returns: boolean - true if the fonts would be searched recursively, false otherwise.

equals(FolderFontSource other)

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

equals(Object o)

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

hashCode()

public int hashCode()

Returns the hash code for the current FolderFontSource object.

Returns: int - a hash code for the current FolderFontSource object.

toString()

public String toString()

Returns a string that represents the current object.

Returns: java.lang.String - a string that represents the current object.