THotPDF.ShapingFeatures Property

THotPDF API reference

 

THotPDF Methods  Auto Shaping  GSUB

Controls HotPDF's opt-in producer-side shaping, positioning, localized-form, and script-preprocess pipeline. The default empty set keeps output byte-stable; each flag enables a specific GSUB, GPOS, or script-level path when a Unicode font and text run need it

 

Delphi syntax

property ShapingFeatures: THPDFShapingFeatures read FShapingFeatures write FShapingFeatures;

type THPDFShapingFeature = (sfArabicGSUB, sfStandardLigatures, sfContextualLigatures, sfStylisticAlternates, sfIndicShaping, sfContextualAlternates, sfKerning, sfMarkPositioning, sfTibetanShaping, sfMongolianShaping, sfIndicGSUB, sfLocalizedForms, sfVerticalKerning, sfThaiLaoReorder, sfHebrewReorder, sfJavaneseShaping, sfMarkToLigature, sfCursiveAttachment, sfDiscretionaryLigatures, sfHistoricalLigatures, sfSmallCaps, sfCapsToSmallCaps, sfOldstyleFigures, sfLiningFigures, sfSuperscripts, sfSubscripts, sfOrdinals, sfFractions, sfTaiVietReorder, sfMeeteiMayekShaping, sfDistancePositioning, sfKhmerShaping, sfMyanmarShaping, sfVerticalAlternates, sfCaseSensitiveForms, sfSlashedZero, sfProportionalFigures, sfTabularFigures, sfScientificInferiors, sfNumerators, sfDenominators);

 

Covered APIs

APIUsage notes
sfArabicGSUBEnables native Arabic GSUB contextual shaping by applying the registered font's init, medi, fina, isol, rlig, calt, and rclt lookups, then emitting the resulting glyph IDs through synthetic codepoints when needed
sfStandardLigaturesApplies standard Latin ligature substitutions such as fi, fl, ffi, and ffl when the font exposes the liga feature
sfContextualLigaturesAdds contextual ligature substitution through clig after the standard ligature pass
sfStylisticAlternatesReserves the shaping flag for caller-controlled stylistic alternate workflows that query alternate glyphs explicitly
sfIndicShapingRuns the conservative Indic syllable reorder path before text output without forcing full GSUB feature application
sfContextualAlternatesApplies required contextual alternates through the rclt-capable GSUB contextual lookup path
sfKerningEnables GPOS pair-kerning adjustments during left-to-right Unicode text emission
sfMarkPositioningEnables GPOS Mark-to-Base and Mark-to-Mark offsets for combining marks
sfTibetanShapingEnables Tibetan GSUB shaping and synthetic-codepoint emission for shaped Tibetan glyph IDs
sfMongolianShapingEnables Mongolian positional-form shaping through joining analysis and font GSUB lookups
sfIndicGSUBRuns the Indic reorder and GSUB feature chain, then emits shaped glyph IDs through synthetic codepoints
sfLocalizedFormsApplies GSUB locl localized-form substitutions under the active script and language
sfVerticalKerningEnables GPOS vkrn and vpal vertical advance adjustment in the vertical text output path
sfThaiLaoReorderEnables Thai/Lao SARA AM decomposition and tone-mark ordering before cmap-to-GID mapping
sfHebrewReorderOrders Hebrew niqqud and points by canonical combining class before RTL output and mark placement
sfJavaneseShapingEnables Javanese pre-base vowel-sign reorder before glyph mapping
sfMarkToLigatureEnables GPOS Mark-to-Ligature placement for combining marks attached to ligature components
sfCursiveAttachmentEnables GPOS cursive entry/exit anchor alignment for glyph runs shaped by the font's native Arabic GSUB lookups
sfDiscretionaryLigaturesApplies discretionary ligature substitutions through the OpenType dlig feature
sfHistoricalLigaturesApplies historical ligature substitutions through the OpenType hlig feature
sfSmallCapsApplies lower-case to small-cap substitutions through the OpenType smcp feature
sfCapsToSmallCapsApplies capital-to-small-cap substitutions through the OpenType c2sc feature
sfOldstyleFiguresApplies oldstyle digit substitutions through the OpenType onum feature
sfLiningFiguresApplies lining digit substitutions through the OpenType lnum feature
sfSuperscriptsApplies superscript glyph substitutions through the OpenType sups feature
sfSubscriptsApplies subscript glyph substitutions through the OpenType subs feature
sfOrdinalsApplies ordinal glyph substitutions through the OpenType ordn feature
sfFractionsApplies numerator, fraction slash, and denominator substitutions through the OpenType frac feature
sfTaiVietReorderEnables Tai Viet visual-order-left vowel and mark ordering before cmap-to-GID mapping
sfMeeteiMayekShapingEnables Meetei Mayek Brahmic-style syllable reorder before cmap-to-GID mapping
sfDistancePositioningApplies GPOS distance positioning for complex-script spacing lookups beyond plain kerning
sfKhmerShapingEnables Khmer pre-base vowel and cluster reorder before cmap-to-GID mapping
sfMyanmarShapingEnables Myanmar kinzi, pre-base vowel, medial, and mark reorder before cmap-to-GID mapping
sfVerticalAlternatesApplies vertical alternate substitutions through the OpenType vert and vrt2 features
sfCaseSensitiveFormsApplies case-sensitive punctuation and symbol substitutions through the OpenType case feature
sfSlashedZeroApplies slashed-zero digit substitutions through the OpenType zero feature
sfProportionalFiguresApplies proportional digit-width substitutions through the OpenType pnum feature
sfTabularFiguresApplies tabular digit-width substitutions through the OpenType tnum feature
sfScientificInferiorsApplies scientific inferior glyph substitutions through the OpenType sinf feature
sfNumeratorsApplies numerator glyph substitutions through the OpenType numr feature
sfDenominatorsApplies denominator glyph substitutions through the OpenType dnom feature

 

Usage notes

Use this property after RegisterUnicodeTTF and before writing text. Choose sfLocalizedForms for locl substitutions, feature-family flags for typographic alternates and figure styles, sfKerning, sfVerticalKerning, and sfDistancePositioning for GPOS advance adjustment, sfMarkPositioning, sfMarkToLigature, and sfCursiveAttachment for mark or cursive attachment, sfIndicGSUB for full Indic GSUB shaping, and the script-specific preprocess flags for Thai/Lao, Khmer, Myanmar, Tai Viet, Meetei Mayek, Hebrew, and Javanese text

 

See also: Automatic Shaping Pipeline GPOS methods Indic shaping methods Script shaping preprocess methods