ITrFont

public interface ITrFont

This interface give access to main parameters of font.

Methods

Method Description
getFontType() Gets a type of font in Adobe classification.
getFID() Returns font identifier.
getFontName() Gets a name of font.
getEncodingTable() Gets a name of the encoding.
getEncoding() Gets encoding array.
getCharStrings() Gets a mapping between character name and glyph.
getFont() Gets DrFont corresponding to this font.
getNativeFont() Gets java.awt.Font corresponding to this font.
getTransform() Gets font transformation.
getSize() Gets font size.
getStyle() Gets font style.
deriveFont(float size) Creates equivalent of this font with new size.
deriveFont(int style) Creates equivalent of this font with new style.
deriveFont(float size, int style) Creates equivalent of this font with new size and style.
deriveFont(AffineTransform transform) Creates equivalent of this font with new transform.
getCharWidth(char charValue) Gets a width of character.
getOutline(char charValue, float x, float y) Returns an outline of glyph in specified location.
clone() Clones the font.

getFontType()

public abstract int getFontType()

Gets a type of font in Adobe classification.

Returns: int - Font type.

getFID()

public abstract int getFID()

Returns font identifier.

Returns: int - font identifier

getFontName()

public abstract String getFontName()

Gets a name of font.

Returns: java.lang.String - Font name.

getEncodingTable()

public abstract String getEncodingTable()

Gets a name of the encoding.

Returns: java.lang.String - A name of the encoding.

getEncoding()

public abstract String[] getEncoding()

Gets encoding array.

Returns: java.lang.String[] - An encoding array.

getCharStrings()

public abstract HashMap<String,IGlyph> getCharStrings()

Gets a mapping between character name and glyph.

Returns: java.util.HashMap<java.lang.String,com.aspose.page.IGlyph> - A mapping between character name and glyph.

getFont()

public abstract DrFont getFont()

Gets DrFont corresponding to this font.

Returns: com.aspose.foundation.drawing.DrFont - DrFont.

getNativeFont()

public abstract Font getNativeFont()

Gets java.awt.Font corresponding to this font.

Returns: java.awt.Font - Native font.

getTransform()

public abstract AffineTransform getTransform()

Gets font transformation.

Returns: java.awt.geom.AffineTransform - A transformation.

getSize()

public abstract float getSize()

Gets font size.

Returns: float - A size of the font.

getStyle()

public abstract int getStyle()

Gets font style.

Returns: int - A style of the font.

deriveFont(float size)

public abstract ITrFont deriveFont(float size)

Creates equivalent of this font with new size.

Parameters:

Parameter Type Description
size float Size of new font.

Returns: ITrFont - A new font.

deriveFont(int style)

public abstract ITrFont deriveFont(int style)

Creates equivalent of this font with new style.

Parameters:

Parameter Type Description
style int Style of new font.

Returns: ITrFont - A new font.

deriveFont(float size, int style)

public abstract ITrFont deriveFont(float size, int style)

Creates equivalent of this font with new size and style.

Parameters:

Parameter Type Description
size float Size of new font.
style int Style of new font.

Returns: ITrFont - A new font.

deriveFont(AffineTransform transform)

public abstract ITrFont deriveFont(AffineTransform transform)

Creates equivalent of this font with new transform.

Parameters:

Parameter Type Description
transform java.awt.geom.AffineTransform Transformation of new font.

Returns: ITrFont - A new font.

getCharWidth(char charValue)

public abstract float getCharWidth(char charValue)

Gets a width of character.

Parameters:

Parameter Type Description
charValue char Character.

Returns: float - A width of character.

getOutline(char charValue, float x, float y)

public abstract Shape getOutline(char charValue, float x, float y)

Returns an outline of glyph in specified location.

Parameters:

Parameter Type Description
charValue char Character.
x float X coordinate of the character location.
y float Y coordinate of the character location.

Returns: java.awt.Shape - An outline of glyph.

clone()

public abstract ITrFont clone()

Clones the font.

Returns: ITrFont - A new font.