|
THotPDF.CompactFontSubsetting
|
Properties EnableFontSubsetting FontEmbedding |
|
Controls whether font subsets renumber the glyphs they retain, which makes them a great deal smaller
Delphi syntax: property CompactFontSubsetting: Boolean;
C++ syntax: __property bool CompactFontSubsetting;
Description Set CompactFontSubsetting to true before BeginDoc to build compact font subsets. An ordinary subset preserves the source font's glyph numbering: unused glyphs are emptied out, yet the font still declares every glyph and carries a location and width entry apiece. With a CJK face carrying 20,000 to 30,000 glyphs, those tables alone add over 200 KB before compression, even when the page displays just two characters
A compact subset renumbers the glyphs it keeps into a dense range and rebuilds the glyph tables for those alone. Page content still quotes the original glyph numbers as CIDs, and an explicit
The property covers TrueType faces written as Type 0 fonts whilst EnableFontSubsetting is on, plus the face registered with RegisterUnicodeTTF, which is always subset. OpenType-CFF faces keep the ordinary subset. Where a compact subset cannot be produced for a font, HotPDF falls back to the ordinary one
The property defaults to off, leaving existing output untouched. Under PDF/A the registered face always receives a compact subset. A compact subset suits final output best: text added to the document later in the same font requires a fresh subset, and documents merged later cannot share that font's subset
See also: EnableFontSubsetting, FontEmbedding, RegisterUnicodeTTF |