[]
Represents a TrueType or OpenType font.
get avgCharWidth(): number;
The Average Character Width parameter specifies the arithmetic average of the escapement (width) of all non-zero width glyphs in the font.
number
get bold(): boolean;
The value of the Bold flag from the OS/2 font table data.
boolean
get canEmbed(): boolean;
Indicates whether this font can be embedded.
boolean
get canSubset(): boolean;
Indicates whether this font can be serialized as a subset of the source font data.
boolean
get capHeight(): number;
The metric specifying the distance between the baseline and the approximate height of uppercase letters.
number
get copyrightNotice(): string;
The Copyright notice of the font.
string
get enableHinting(): boolean;
Gets or sets a value indicating if the TrueType glyph hinting instructions can be executed.
boolean
set enableHinting(value): void;
Gets or sets a value indicating if the TrueType glyph hinting instructions can be executed.
boolean
void
get fontFamily(): string;
The font family name. Up to four faces can share the same font family name.
string
get fullFontName(): string;
The full font name that reflects all family and relevant subfamily descriptors.
string
get hasLinkedFonts(): boolean;
Indicates whether the current font has linked fonts.
boolean
get hollow(): boolean;
Indicates if characters are hollow (outlined), otherwise they are solid.
boolean
get horizontalAscender(): number;
The typographic or legacy ascender for this font.
number
get horizontalDescender(): number;
The typographic or legacy descender for this font.
number
get horizontalLineGap(): number;
The typographic or legacy line gap for this font.
number
get id(): number;
Gets the reference to the object.
number
get isCollection(): boolean;
Indicates if the font was loaded from .ttc or .otc font collection.
boolean
get isColorFont(): boolean;
Indicates if this font contains color glyphs.
boolean
get isCompressed(): boolean;
Indicates if the font is in WOFF format.
boolean
get isFixedPitch(): boolean;
False if the font is proportionally spaced, True if the font is not proportionally spaced (i.e. monospaced).
boolean
get isOrnamentalFont(): boolean;
Indicates whether the font-family design reflects the ISO Ornamental Class and the ISO Blackletter Class.
boolean
get isPostScript(): boolean;
Indicates if the current font contains PostScript outlines.
boolean
get isSansSerif(): boolean;
Indicates whether the font-family design reflects the ISO Sans Serif Class.
boolean
get isScriptFont(): boolean;
Indicates whether the font-family design reflects the ISO Script Class and Uncial Class.
boolean
get isSerifFont(): boolean;
Indicates whether the font-family design reflects any of the Serif classes, except Sans Serif.
boolean
get isSymbolicFont(): boolean;
Indicates whether this is a symbolic font suitable for Pi and special characters (icons, dingbats, technical symbols, etc.)
boolean
get isVerticalFont(): boolean;
Indicates if this is a vertical font.
boolean
get italic(): boolean;
The value of the Italic flag from the OS/2 font table data.
boolean
get italicAngle(): number;
The italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).
number
get lastResort(): boolean;
Indicates if the glyphs encoded in the cmap subtables are simply generic symbolic representations of code point ranges and don't truly represent support for those code points.
boolean
get licenseDescription(): string;
The description of the license or licenses under which the font is provided.
string
get licenseInfoURL(): string;
The URL where additional licensing information can be found.
string
get negative(): boolean;
Indicates if characters have their foreground and background reversed.
boolean
get numGlyphs(): number;
The number of glyphs in this font.
number
get oblique(): boolean;
The value of the Oblique flag from the OS/2 font table data.
boolean
get om(): ObjectManager;
Gets the owner ObjectManager instance.
get permissionToEmbedGranted(): boolean;
Gets or sets a value indicating that the developer of the software has obtained explicit permission from the legal owner of the font to embed it in documents produced by the software.
boolean
set permissionToEmbedGranted(value): void;
Gets or sets a value indicating that the developer of the software has obtained explicit permission from the legal owner of the font to embed it in documents produced by the software.
boolean
void
get postScriptName(): string;
The PostScript name of the font.
string
get revision(): number;
The revision number set by font manufacturer.
number
get smallXHeight(): number;
The metric specifying the distance between the baseline and the approximate height of non-ascending lowercase letters.
number
get strikeout(): boolean;
Indicates if characters are overstruck.
boolean
get typographicFamilyName(): string;
The typographic family grouping name.
string
get underscore(): boolean;
Indicates if characters are underscored.
boolean
get unitsPerEm(): number;
The design units per Em, valid range is from 16 to 16384.
number
get useBitmapCache(): boolean;
Gets or sets a value indicating if the Bitmap Glyph Cache is enabled.
boolean
set useBitmapCache(value): void;
Gets or sets a value indicating if the Bitmap Glyph Cache is enabled.
boolean
void
get version(): string;
The version set by font manufacturer.
string
get verticalAscender(): number;
The vertical typographic ascender for this font.
number
get verticalDescender(): number;
The vertical typographic descender for this font.
number
get verticalLineGap(): number;
The vertical typographic gap for this font.
number
get weightClass(): number;
The visual weight (degree of blackness or thickness of strokes) of the characters in the font. Values from 1 to 1000 are valid.
number
get widthClass(): number;
Indicates a relative change from the normal aspect ratio (width to height ratio) for the glyphs in a font. Values from 1 (Ultra Condensed) to 9 (Ultra Expanded) are expected.
number
static getPdfFont(standardPdfFont): Font;
Returns an instance of the standard PDF font.
Specifies one of the standard PDF fonts.
Font
A new instance of the Font.
static getPdfFont(om, standardPdfFont): Font;
Returns an instance of the standard PDF font.
An object manager that controls the lifetime of the Font object.
Specifies one of the standard PDF fonts.
Font
A new instance of the Font.
static load(fontBytes): Font;
Creates a Font instance from a byte array.
Uint8Array
The binary data of the font.
Font
A new instance of the Font.
static load(om, fontBytes): Font;
Creates a Font instance from a byte array.
An object manager that controls the lifetime of the Font object.
Uint8Array
The binary data of the font.
Font
A new instance of the Font.
static loadCollection(fontBytes): Font[];
Loads all Fonts from a byte array containing single font or a font collection.
Uint8Array
The byte array with the font data.
Font[]
The array of loaded Fonts.
static loadCollection(om, fontBytes): Font[];
Loads all Fonts from a byte array containing single font or a font collection.
An object manager that controls the lifetime of the Font objects.
Uint8Array
The byte array with the font data.
Font[]
The array of loaded Fonts.
addLinkedFont(font, scaleFactor?): void;
Adds a linked font to the current font.
Font
The Font to be added as linked font.
number
The scale factor applied to size of the base font when the linked font is used instead.
void
clearLinkedFonts(): void;
Clears the list of linked fonts.
void
containsCodePoint(codePoint): boolean;
Returns a value indicating whether the font can map the specified UTF-32 character to a glyph.
number
The UTF-32 characer (code point) to check.
boolean
true if the font can map the character to a glyph, false otherwise.
free(): void;
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
rebind(omTo): void;
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
removeLinkedFont(font): void;
Removes a linked font from the current font.
Font
The Font to be removed from the list of linked fonts.
void