DynaPDF Manual - Page 439

Previous Page 438   Index   Next Page 440

Function Reference
Page 439 of 860
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.
};
The function returns the outline of a glyph of the active font. The usage is slightly different
depending on the used programming language:
C, C++, Delphi
The function must be called twice, the first time with the parameter Outline set to NULL or nil to
determine the size of the glyph outline (the function returns the number of points in this case). The
member Outline of the TPDFGlyphOutline structure can now be allocated and the function can be
called again. See example below the function description for further information.
 

Previous topic: GetFTextHeightEx, GetFullyQualifiedFieldName, GetGlyphIndex

Next topic: C#, VB 6, VB .Net, PHP, Outline format