API referenceFonts

pdfGetGlyphOutline

Extract the point-contour outline of one glyph from the

CategoryGlyph introspection
Notecurrent font only, and Type 1 fonts only (see Remarks)

Purpose — Extract the point-contour outline of one glyph from the currently active font.

Declarations

C
int32_t __stdcall pdfGetGlyphOutline(PPDF IPDF, uint32_t Index, PPDFGlyphOutline Outline);
Delphi
function pdfGetGlyphOutline(const IPDF: PPDF; Index: Cardinal; Outline: PPDFGlyphOutline): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
IndexCardinalCharacter code to extract the outline for.
OutlinePPDFGlyphOutlineReceives PointCount, Points (contour point array), Advance.

Return value — Point count (> 0) on success; 0 if the current font isn't a Type 1 font (this build's contour extractor is Type-1-specific — it does not work for TrueType, standard-14, or CID fonts, despite pdfGetGlyphIndex being the TrueType-specific sibling — the two calls cover mutually exclusive font kinds), or the glyph has no contours.

Memory & buffersOutline.Points points at an engine-owned buffer valid until the next call to this function.

Remarks — real, verified asymmetry. pdfGetGlyphIndex works only for TrueType; pdfGetGlyphOutline works only for Type 1. There is no single call in this build that extracts outlines for a TrueType glyph.

See alsopdfGetGlyphIndex

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetGlyphOutline(IntPtr IPDF, uint Index, IntPtr Outline);
Area
Fonts
Category

Getters

Exported names

pdfGetGlyphOutline

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.