Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.GetGlyphOutline

Returns the outline of a glyph of the active font.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 14.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.GetGlyphOutline"; PDF; Index )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Index The Code page, Unicode, or CJK index. 123

Result

Returns JSON or error.

Description

Returns the outline of a glyph of the active font.
The JSON returns:
AdvanceXGlyph width in horizontal writing mode.
AdvanceYGlyph height in vertical writing mode.
OriginXPlacement vector (vertical writing mode only).
OriginYPlacement vector (vertical writing mode only).
LsbLeft side bearing (already applied, info only).
TsbTop side bearing (already applied, info only).
HaveBBoxIf true, BBox was computed.
BBoxBounding box of the glyph outline.
OutlineOutlines.
SizeNumber of points.

See also GetGlyphOutline function in DynaPDF manual.

Examples

Queries glyph outline:

Show Custom Dialog [ "r" ; MBS( "DynaPDF.GetGlyphOutline"; $PDF; Code("A") ) ]

Example result:
{ "AdvanceX": 583, "AdvanceY": 0, "OriginX": 0, "OriginY": 0, "Lsb": 132, "Tsb": 250, "HaveBBox": false, "Size": 7, "Glyph": 65, "BBox": { "MinX": 0, "MinY": 0, "MaxX": 0, "MaxY": 0 }, "Outline": [ { "cmdCode": 1, "cmdText": "MoveTo", "x": 510.25, "y": 719.734375 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 597.65625, "y": 288.09375 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 475.09375, "y": 288.09375 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 422.859375, "y": 564.453125 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 251.953125, "y": 288.09375 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 128.90625, "y": 288.09375 }, { "cmdCode": 2, "cmdText": "LineTo", "x": 400.390625, "y": 719.734375 } ] }

See also

This function checks for a license.

Created 26th September 2024, last changed 26th September 2024


DynaPDF.GetGlyphIndex - DynaPDF.GetImage