THotPDF Shaping Subset and ToUnicode Mapping Methods

THotPDF API reference

 

THotPDF Methods  Auto Shaping  GSUB

Shaped GID가 올바르게 render 및 extract되도록 하는 glyph-subset 및 ToUnicode plumbing을 문서화합니다

 

Delphi 구문

procedure EnableShapingFeatureForSubset(const FeatureTag: AnsiString); overload;

procedure EnableShapingFeatureForSubset(Feature: THPDFShapingFeature); overload;

procedure MarkUnicodeGlyphUsed(GID: Word);

procedure RegisterToUnicodeReverseMapping(SubstCodepoint: Cardinal; const SourceCodepoints: array of Cardinal);

procedure ClearToUnicodeReverseMappings;

function ToUnicodeReverseMappingCount: Integer;

function AssignSyntheticCodepointForGID(GID: Word; out SyntheticCP: Word): Boolean;

function GetSyntheticCodepointForGID(GID: Word): Word;

procedure MarkSyntheticCpRTL(Cp: Word);

function IsRTLSyntheticCp(Cp: Word): Boolean;

function IsRTLSyntheticGID(GID: Word): Boolean;

 

Covered APIs

API사용 참고 사항
EnableShapingFeatureForSubsetMarks GSUB features whose output glyphs must be retained in the embedded subset
MarkUnicodeGlyphUsedAdds a returned substitute GID to the embedded font subset closure
RegisterToUnicodeReverseMappingRegisters a substitute codepoint to source-codepoint mapping for extraction and accessibility
ClearToUnicodeReverseMappingsClears all caller-registered reverse mappings for the current document
ToUnicodeReverseMappingCountReturns the number of registered reverse mappings
AssignSyntheticCodepointForGIDAllocates a private-use synthetic codepoint that renders a glyph ID through CIDToGIDMap
GetSyntheticCodepointForGIDReturns the synthetic codepoint already assigned to a glyph ID
MarkSyntheticCpRTLMarks a synthetic codepoint as right-to-left so emit ordering remains correct
IsRTLSyntheticCpReports whether a synthetic codepoint was marked for right-to-left emission
IsRTLSyntheticGIDReports whether a glyph ID resolves to a synthetic codepoint marked for right-to-left emission

 

사용 참고 사항

Shaping workflow가 normal Unicode cmap entry로 도달할 수 없는 glyph ID를 emit할 때 이 API를 사용하십시오. Synthetic codepoint는 CIDToGIDMap을 통해 rendering을 route하고, reverse mapping은 text extraction을 위해 original source codepoint를 recover합니다

 

참조: AssignSyntheticCodepointForGID GSUB lookup methods Indic shaping methods