pdfSetFontEncodingDiff
Override the glyph name for one character code in a simple
| Category | Simple-font encoding |
|---|---|
| Exported names | pdfSetFontEncodingDiffA (ANSI only — no W variant) |
Purpose — Override the glyph name for one character code in a simple font's /Differences encoding array.
Description — Stores GlyphName at Code in the target font entry's 256-slot difference table (allocated on first use). Applies to the specific font identified by FontHandle — this one, unlike several others in this chapter, does take an explicit font handle rather than implicitly targeting "the current font."
Declarations
BOOL32 __stdcall pdfSetFontEncodingDiffA(PPDF IPDF, int32_t FontHandle, int32_t Code, const char* GlyphName);
function pdfSetFontEncodingDiffA(const IPDF: PPDF; FontHandle, Code: Integer; const GlyphName: PAnsiChar): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
FontHandle | Integer | Target font entry's handle. |
Code | Integer | Character code, 0..255. |
GlyphName | PAnsiChar | Standard PostScript glyph name (e.g. "bullet", "Euro") to map at that code. |
Return value — TRUE if FontHandle is valid and Code is in 0..255; FALSE otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetFontEncodingDiffA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.