API reference › Fonts

pdfSetFontEncodingDiff

Override the glyph name for one character code in a simple

CategorySimple-font encoding
Exported namespdfSetFontEncodingDiffA (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

C
BOOL32 __stdcall pdfSetFontEncodingDiffA(PPDF IPDF, int32_t FontHandle, int32_t Code, const char* GlyphName);
Delphi
function pdfSetFontEncodingDiffA(const IPDF: PPDF; FontHandle, Code: Integer; const GlyphName: PAnsiChar): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
FontHandleIntegerTarget font entry's handle.
CodeIntegerCharacter code, 0..255.
GlyphNamePAnsiCharStandard 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)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category

Setters

Exported names

pdfSetFontEncodingDiffA

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.