SetMissingGlyphCallback
Text, fonts, callbacks
Description
Registers an optional callback that can observe a missing Unicode scalar and select report or abort behaviour for that event
Syntax
Delphi
TPDFlibMissingGlyphEvent= Procedure(Sender: TObject;
CodePoint: Cardinal; UTF16Index, Page: Integer;
Const FontName, Operation: WideString; Var Action: Integer) Of Object;
PDFlib.OnMissingGlyph:= MissingGlyphHandler;ActiveX
Function PDFlib::SetMissingGlyphCallback(Callback As Object) As LongDLL
int DLSetMissingGlyphCallback(int InstanceID, Pointer Callback, Pointer UserData);Parameters
| CodePoint | The complete Unicode scalar value |
|---|---|
| UTF16Index | The zero-based source index of the scalar or shaped cluster |
| Page | The selected one-based page number or zero when no page is active |
| FontName | The selected font program or resource name |
| Operation | The text operation that detected the missing glyph |
| Action | The current policy on entry; return or assign 0 to report and drop, or 1 to abort |
Return values
The registration methods return 1 for a valid instance
Remarks
The event is added to the retained report before the callback runs
DLL text pointers are read-only and valid only for the duration of the callback
Exceptions crossing the DLL or ActiveX callback boundary are contained and fall back to report-and-drop behaviour