Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 379

Previous Page 378   Index   Next Page 380

Function Reference
Page 379 of 750
GetGlyphIndex
Syntax:
SI32 pdfGetGlyphIndex(
const PPDF* IPDF, // Instance pointer
UI32 Index)
// Code page, Unicode, or CJK index
The function returns the glyph index of the given code page or Unicode index. How Index must be
defined depends on the code page with which the font was loaded. For example, if the font was
loaded with a 8 bit code page, then indexes below 256 are treated as index into the code page table.
Higher indexes are treated as Unicode value in this case. Note that all Unicode encoded glyphs of the
font are accessible in this case, also if the font was loaded with a 8 bit code page!
At time of publication the function does not support CJK code pages which require a conversion to
Unicode, e.g. cpCJK_Big5_Uni, cpCJK_EUC_JP_Uni, and so on.
Return values:
If the function succeeds the return value is greater or equal zero. If the function fails the return value
is a negative error code.
GetGlyphOutline
Syntax:
SI32 pdfGetGlyphOutline(
const PPDF* IPDF,
// Instance pointer
UI32 Index,
// Glyph index
struct TPDFGlyphOutline* Outline) // see below
struct TFRect
{
SI16 MinX;
SI16 MinY;
SI16 MaxX;
SI16 MaxY;
};
struct TI32Point
{
SI32 x;
SI32 y;
};
struct TPDFGlyphOutline
{
float
AdvanceX; // Glyph width in horizontal writing mode.
float
AdvanceY; // Glyph height in vertical writing mode.
float
OriginX;
// Placement vector (vertical writing mode only).
float
OriginY;
// Placement vector (vertical writing mode only).
SI16
Lsb;
// Left side bearing (already applied, info only).
SI16
Tsb;
// Top side bearing (already applied, info only).
LBOOL
HaveBBox; // If true, BBox was computed.
struct TFRect
BBox;
// Bounding box of the glyph outline.
struct TI32Point* Outline;
// Encoded outline. See description.
UI32
Size;
// Number of points.
};
 

Previous topic: GetFTextHeightEx

Next topic: Outline format