THPDFPage.SetEmbeddedGlyphFont Method
Selects validated caller-owned font bytes without installing or resolving the face through GDI
Declaration
function SetEmbeddedGlyphFont(
const FontIdentity: AnsiString;
const FontData: TBytes;
FontCollectionIndex: Integer;
ASize: Single): boolean;
Parameters
FontIdentityis a stable document-local cache identity for the supplied programFontDatacontains a TrueType, OpenType, or TrueType Collection programFontCollectionIndexselects a zero-based TTC member and must be zero for a standalone fontASizeis the positive font size in page units
Behavior
- Validates the sfnt tables, glyph count, units per em, cmap, metrics, and finite size before changing the current font
- Rejects restricted and bitmap-only embedding permissions and honors the no-subsetting bit
- Builds cached BMP and supplementary-plane cmap lookups plus per-glyph advances
- Returns false without selecting the font when validation fails
Related APIs
THPDFPage.GetEmbeddedGlyphID · THPDFPage.DrawEmbeddedGlyphRun