THotPDF.ShapingFeatures Property

THotPDF API reference

 

THotPDF Methods  Auto Shaping  GSUB

Controls HotPDF's opt-in producer-side shaping, positioning, localised-form, and script-preprocess pipeline

 

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
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
sfStylisticAlternatesApplies stylistic alternate substitutions through the OpenType salt feature in the Latin single-substitution pass, and keeps the tag enabled for the embedded subset
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 localised-form substitutions under the active script and language
sfVerticalKerningEnables GPOS vkrn and vpal vertical advance adjustment in the vertical text output path; the adjustment changes the step between glyphs, so a vertical run that the flag affects is written as one show block per glyph instead of one embedded run, which leaves the default output byte-identical
sfThaiLaoReorderEnables Thai/Lao SARA AM decomposition and mark ordering
sfHebrewReorderEnables Hebrew mark ordering by canonical combining class
sfJavaneseShapingEnables Javanese pre-base vowel-sign reorder
sfMarkToLigatureEnables GPOS Mark-to-Ligature placement
sfCursiveAttachmentEnables GPOS cursive entry/exit anchor alignment
sfDiscretionaryLigaturesApplies discretionary ligatures through dlig
sfHistoricalLigaturesApplies historical ligatures through hlig
sfSmallCapsApplies small-cap substitutions through smcp
sfCapsToSmallCapsApplies capital-to-small-cap substitutions through c2sc
sfOldstyleFiguresApplies oldstyle figures through onum
sfLiningFiguresApplies lining figures through lnum
sfSuperscriptsApplies superscript glyphs through sups
sfSubscriptsApplies subscript glyphs through subs
sfOrdinalsApplies ordinal glyphs through ordn
sfFractionsApplies fraction substitutions through frac
sfTaiVietReorderEnables Tai Viet vowel and mark ordering
sfMeeteiMayekShapingEnables Meetei Mayek syllable reorder
sfDistancePositioningEnables GPOS distance positioning
sfKhmerShapingEnables Khmer pre-base vowel and cluster reorder
sfMyanmarShapingEnables Myanmar kinzi, pre-base vowel, medial, and mark reorder
sfVerticalAlternatesApplies vertical alternates through vert and vrt2
sfCaseSensitiveFormsApplies case-sensitive forms through case
sfSlashedZeroApplies slashed zero through zero
sfProportionalFiguresApplies proportional figures through pnum
sfTabularFiguresApplies tabular figures through tnum
sfScientificInferiorsApplies scientific inferiors through sinf
sfNumeratorsApplies numerators through numr
sfDenominatorsApplies denominators through dnom

 

Usage notes

SVG text imports, loaded Unicode and rich FreeText appearances, and previewable loaded text replacements inherit this complete feature set, the script auto-shaping switches and the current GSUB script and language selections; configure them before generating the text and keep them stable between replacement preview and apply

Use this property after RegisterUnicodeTTF and before writing text. Choose typographic feature and figure-style flags, GPOS flags for spacing and anchors, and script-specific preprocess flags before cmap-to-GID mapping

 

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