IFont

public interface IFont

Declares common functionality for all font formats. Implemented by Font classes.

Methods

MethodDescription
getFontType()Gets Font type.
getStyle()Gets Font style.
setStyle(String value)Sets Font style.
getFontStyle()Gets Font style.
getFontFamily()Gets Font family.
setFontFamily(String value)Sets Font family.
getFontName()Gets Font face name.
setFontName(String value)Sets Font face name.
getFontNames()Gets Font names.
getPostscriptNames()Gets postscript Font names.
getNumGlyphs()Gets number of glyphs in the Font.
getMetrics()Gets Font metrics.
getEncoding()Gets Font encoding.
getGlyphAccessor()Gets Font glyph accessor.
getFontDefinition()Gets Font definition.
getFontSaver()Gets Font save functionality.
convert(FontType fontType)Converts the Font into another format.

getFontType()

public abstract FontType getFontType()

Gets Font type.


Type1, TrueType etc.

Returns: FontType - Font type.

getStyle()

public abstract String getStyle()

Gets Font style. This is a raw string value provided by Font file.

Returns: java.lang.String - Font style.

setStyle(String value)

public abstract void setStyle(String value)

Sets Font style. This is a raw string value provided by Font file.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew Font style.

getFontStyle()

public abstract EnumSet<FontStyle> getFontStyle()

Gets Font style. This is a value computed and represented in generalized type.

Returns: java.util.EnumSet<com.aspose.font.FontStyle> - Font style. Usually, a combination of FontStyle class constant flag values or 0.

getFontFamily()

public abstract String getFontFamily()

Gets Font family.

Returns: java.lang.String - Font family.

setFontFamily(String value)

public abstract void setFontFamily(String value)

Sets Font family.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew Font family.

getFontName()

public abstract String getFontName()

Gets Font face name.

Returns: java.lang.String - Font face name.

setFontName(String value)

public abstract void setFontName(String value)

Sets Font face name.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew Font face name.

getFontNames()

public abstract MultiLanguageString getFontNames()

Gets Font names.

Returns: MultiLanguageString - Font names.

getPostscriptNames()

public abstract MultiLanguageString getPostscriptNames()

Gets postscript Font names.

Returns: MultiLanguageString - Postscript Font names.

getNumGlyphs()

public abstract int getNumGlyphs()

Gets number of glyphs in the Font.

Returns: int - Number of glyphs in the Font..

getMetrics()

public abstract IFontMetrics getMetrics()

Gets Font metrics.

Returns: IFontMetrics - Font metrics.

getEncoding()

public abstract IFontEncoding getEncoding()

Gets Font encoding.

Returns: IFontEncoding - Font encoding.

getGlyphAccessor()

public abstract IGlyphAccessor getGlyphAccessor()

Gets Font glyph accessor. Retrieves glyphs and glyph identifiers.

Returns: IGlyphAccessor - Font glyph accessor.

getFontDefinition()

public abstract FontDefinition getFontDefinition()

Gets Font definition.

Returns: FontDefinition - Font definition.

getFontSaver()

public abstract IFontSaver getFontSaver()

Gets Font save functionality.

Returns: IFontSaver - Font save functionality.

convert(FontType fontType)

public abstract Font convert(FontType fontType)

Converts the Font into another format.

Parameters:

ParameterTypeDescription
fontTypeFontTypetype to convert to font into

Returns: Font - font converted into format specified