HotPDF Developer Reference
Delphi and C++Builder PDF component help
|
THotPDF.EnableFontSubsetting
|
Properties FontEmbedding PDF Filter Support |
|
Controls whether embedded fonts are reduced to the glyphs used by the current document.
Delphi syntax: property EnableFontSubsetting: Boolean;
C++ syntax: __property bool EnableFontSubsetting;
Description Set EnableFontSubsetting to true before BeginDoc to reduce embedded font data. HotPDF subsets TrueType fonts and OpenType-CFF fonts (both name-keyed Latin OTF and CID-keyed CJK / Indic / Arabic OTF) while preserving glyph IDs so existing Type0 / Identity-H text output remains valid.
The property is off by default to preserve full-font embedding for documents that may be edited after generation. For final PDF output, enabling subsetting can greatly reduce file size - especially for large CJK CID-keyed OpenType-CFF fonts (Adobe Fan/Gothic/Heiti/Ming/Myungjo/Song Std, Kozuka Pr6N, Source Han Sans, etc.) where only a small fraction of the 18000+ CIDs is typically used per document.
When a subset font is written, HotPDF uses the PDF-required six-letter subset prefix on /BaseFont and keeps the embedded font program internally consistent with the resolved PostScript name.
See also: FontEmbedding, CFF and OpenType Font Subsetting Functions, PDF Filter Support |