| Category | Glyph introspection |
|---|---|
| Note | current font only, and Type 1 fonts only (see Remarks) |
Purpose — Extract the point-contour outline of one glyph from the currently active font.
Declarations
int32_t __stdcall pdfGetGlyphOutline(PPDF IPDF, uint32_t Index, PPDFGlyphOutline Outline);
function pdfGetGlyphOutline(const IPDF: PPDF; Index: Cardinal; Outline: PPDFGlyphOutline): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Index | Cardinal | Character code to extract the outline for. |
Outline | PPDFGlyphOutline | Receives 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 & buffers — Outline.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 also — pdfGetGlyphIndex
C# (P/Invoke)
public static extern int pdfGetGlyphOutline(IntPtr IPDF, uint Index, IntPtr Outline);
Getters
pdfGetGlyphOutline
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.