Aspose::Pdf::Text::Font class

Font class

Represents font object.

class Font : public System::Object

Methods

MethodDescription
CppIsSetTrailerable()
get_BaseFont()Gets BaseFont value of PDF font object. Also known as PostScript name of the font.
get_DecodedFontName()Sometimes PDF fonts(usually Chinese/Japanese/Korean fonts) could have specificical font name. This name is value of PDF font property “BaseFont” and sometimes this property could be represented in hexademical form. If read this name directly it could be represented in non-readable form. To get readable form it’s necessary to decode font’s name by rules specifical for this font. This property returns decoded font name, so use it for cases when you meet with a non-readable FontName. If property FontName has readable form this property will be the same as FontName, so you can use this property for any cases when you need to get font name in a readable form.
get_FontName() constGets font name of the Font object.
get_FontOptions()Useful properties to tune Font behaviour.
get_IsAccessible() constGets indicating whether the font is present (installed) in the system.
get_IsEmbedded() constGets a value that indicates whether the font is embedded. Font based on IFont will automatically be subset and embedded.
get_IsSubset()Gets a value that indicates whether the font is a subset. Font based on IFont will automatically be subset and embedded.
GetLastFontEmbeddingError()An objective of this method - to return description of error if an attempt to embed font was failed. If there are no error cases it returns empty string.
MeasureString(System::String, float)Measures the string.
Save(System::SharedPtr<System::IO::Stream>)Saves the font into the stream. Note that the font is saved to intermediate TTF format intended to be used in a converted copy of the original document only. The font file is not intended to be used outside the original document context.
set_IsEmbedded(bool)Sets a value that indicates whether the font is embedded. Font based on IFont will automatically be subset and embedded.
set_IsSubset(bool)Sets a value that indicates whether the font is a subset. Font based on IFont will automatically be subset and embedded.

See Also