PdfUnicodeFont class

A lightweight Type0 font that maps Unicode code points directly as glyph IDs with Identity-H encoding, without embedding any font program.

This lets non-Latin text (Arabic, CJK, etc.) appear in appearance streams authored with standard fonts. The renderer substitutes a system font for the actual glyph shapes - identical to how it handles any Type0 font without an embedded font program.

Wraps a PdfStandardFont for Latin-range metrics and uses a default width for characters outside the base-14 range.

Implemented types

Constructors

PdfUnicodeFont(PdfStandardFont _base)

Properties

ascent int
Ascender height in thousandths of an em - where the first baseline sits below the top of a text box.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
resourceName String
The /Font resource key referenced from /DA and the appearance resources.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildResource(CosReference addObject(CosObject)) → CosDictionary
Builds the Type0 font resource, referencing the base font's name so the renderer picks the same system font family for substitution.
encodeHex(String text) String
Encodes text as hex-encoded 2-byte Unicode code points for an Identity-H content stream, recording each character for buildResource.
measure(String text, double fontSize) double
Width of text in points at fontSize.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetUsage() → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited