מתודות GPOS של THotPDF להתאמת רווח ומיקום

THotPDF API reference

THotPDF Methods  Auto Shaping  GSUB

מתעד את שאילתות GPOS של HotPDF עבור התאמת רווח בין זוגות (pair-kerning), התאמת רווח הקשרית, התאמת רווח אנכית, עוגן כתיבה מחוברת, מיקום סימן, ושאילתות סימן-לליגטורה, בתוספת דגלי ShapingFeatures המחילים אותם במהלך פלט טקסט

תחביר Delphi

function HasGPOSKerning: Boolean;

function GetGPOSPairAdjustment(FirstGID, SecondGID: Word): Integer;

function GetGPOSPairAdjustment(FirstGID, SecondGID: Word; out AXPlacement, AYPlacement, AYAdvance: Integer): Integer;

function GetGPOSContextualKernRun(const GIDs: array of Word): TArray;

function HasGPOSVerticalKern: Boolean;

function GetGPOSVerticalKern(FirstGID, SecondGID: Word): Integer;

function GetGPOSMarkOffset(BaseGID, MarkGID: Word; out DX, DY: Integer): Boolean;

function GetGPOSMarkMarkOffset(BaseMarkGID, AttachMarkGID: Word; out DX, DY: Integer): Boolean;

function HasGPOSCursive: Boolean;

function GetGPOSCursiveAnchors(GID: Word; out EntryX, EntryY, ExitX, ExitY: Integer; out HasEntry, HasExit: Boolean): Boolean;

function GetGPOSMarkToLigatureOffset(LigGID: Word; ComponentIndex: Integer; MarkGID: Word; out DX, DY: Integer): Boolean;

function GetGPOSLigatureComponentCount(LigGID: Word): Integer;

function ApplyMarkToLigatureShaping(const Wide: UnicodeString): UnicodeString;

ממשקי API מכוסים

APIUsage notes
HasGPOSKerningReports whether the registered Unicode font exposes GPOS kerning lookups
GetGPOSPairAdjustmentReturns the signed advance adjustment for an ordered glyph pair and can also return placement-aware X/Y offsets through the overload
GetGPOSContextualKernRunReturns per-glyph contextual kern adjustments by resolving GPOS Type 7 and Type 8 positioning rules over a glyph run
HasGPOSVerticalKernReports whether the registered Unicode font exposes vertical kerning or vertical proportional adjustment lookups
GetGPOSVerticalKernReturns signed vertical YAdvance adjustment from vkrn or vpal lookups for an ordered glyph pair
GetGPOSMarkOffsetReturns Mark-to-Base placement offsets for attaching a mark glyph to a base glyph
GetGPOSMarkMarkOffsetReturns Mark-to-Mark placement offsets for stacking one mark glyph on another
HasGPOSCursiveReports whether the registered Unicode font exposes GPOS cursive attachment lookups
GetGPOSCursiveAnchorsReturns entry and exit cursive anchors for a glyph when the font supplies a cursive attachment rule
GetGPOSMarkToLigatureOffsetReturns Mark-to-Ligature placement offsets for attaching a mark to a specific ligature component
GetGPOSLigatureComponentCountReturns the number of mark-attachment components recorded for a ligature glyph so callers can choose a valid ComponentIndex before calling GetGPOSMarkToLigatureOffset
ApplyMarkToLigatureShapingRecords ligature component ownership so mark-to-ligature offsets can be applied during text emission
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
sfMarkToLigatureEnables GPOS Mark-to-Ligature offsets for marks attached to individual ligature components
sfCursiveAttachmentEnables GPOS cursive entry/exit anchor alignment during Unicode text emission, including right-to-left Arabic runs shaped by sfArabicGSUB
sfVerticalKerningEnables GPOS vkrn and vpal vertical advance adjustment in the vertical text output path

הערות שימוש

התאמת רווח בין זוגות מחזירה התאמות התקדמות ומיקום עם סימן ביחידות em של 1000. התאמת רווח הקשרית פותרת חיפושים מסוג 7 וסוג 8 לאורך הרצת גליפים. מיקום סימן מכסה עוגנים של סימן-לבסיס, סימן-לסימן, וסימן-לליגטורה. ApplyMarkToLigatureShaping מכין את נתוני רכיבי הליגטורה ברמת ההרצה המשמשים את sfMarkToLigature. חיבור כתיבה מחוברת מיישר עוגן יציאה בגליף אחד לעוגן כניסה בגליף הבא, מה ששימושי ביותר לאחר שעיצוב ערבית GSUB מקורי הפיק את מזהי הגליפים ההקשריים הספציפיים לגופן הנושאים עוגנים אלו. נתיב הפליטה מחיל אותם רק כאשר דגל העיצוב המתאים מופעל

See also: ShapingFeatures OpenType GSUB Engine Automatic Shaping Pipeline