PdfFontInfo class
Metrics, text decoding, and (for embedded TrueType fonts) real glyph outlines for one font dictionary. Fonts without usable embedded outlines fall back to device-side substitution scaled to these widths.
Properties
- baseFont → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOutlines → bool
-
True when embedded glyph outlines are available.
no setter
- isCid → bool
-
True for Type0 composite fonts. Identity-H/V (the common case) and
embedded CMap streams use two-byte codes here; a predefined CJK CMap on a
non-embedded font (Shift-JIS/EUC-JP, GBK, Big5, UHC, or a
Uni*-UCS2/UTF16CMap) is decoded via_cjkCmap.final - isSerif → bool
-
The font descriptor's Serif flag (§9.8.2, bit 2). Only a hint for a
device that has to substitute a face for an unembedded font; a font with
outlines draws them whatever this says.
final
- isType3 → bool
-
no setter
- isVertical → bool
-
True for Type0 fonts with a vertical writing-mode CMap: Identity-V, a
predefined
…-VCMap, or an embedded CMap stream with/WMode 1. Glyphs advance downward and use the vertical metrics from /W2 and /DW2 (§9.7.4.3); horizontal fonts ignore all of that.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
charFor(
int code) → String - Best-effort Unicode for one character code.
-
codesOf(
Uint8List bytes) → List< int> - Splits show-text string bytes into character codes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
outlineFor(
int code) → PdfPath? - Real outline for one character code, in em units, or null.
-
renderGlyph(
int code, {required List< ContentOperation> decode(CosStream proc), required void execute(List<ContentOperation> ops, CosDictionary resources, PdfMatrix glyphToText)}) → void -
Renders the Type3 glyph for
codeby handing its glyph description - the decoded content-stream operations, the resources they draw against, and the glyph-space → text-space /FontMatrix (§9.6.5) - toexecute. -
toString(
) → String -
A string representation of this object.
inherited
-
verticalAdvanceOf(
int code) → double -
Vertical pen advance in em for
code- the y-component of the vertical displacement vector w1 (§9.7.4.3), normally negative (downward). Only meaningful when isVertical. -
verticalOriginOf(
int code) → ({double x, double y}) - Position vector in em from the glyph's horizontal origin to its vertical origin (§9.7.4.3): x centres the glyph on the column (half its horizontal advance) and y comes from /W2 or /DW2. Only meaningful when isVertical.
-
widthOf(
int code) → double - Glyph advance in em units (1.0 = the font size). Falls back to the embedded font's hmtx metrics before the default width.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
load(
CosDocument cos, CosDictionary font) → PdfFontInfo