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 |
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
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:
AdvanceX | Glyph width in horizontal writing mode. |
AdvanceY | Glyph height in vertical writing mode. |
OriginX | Placement vector (vertical writing mode only). |
OriginY | Placement vector (vertical writing mode only). |
Lsb | Left side bearing (already applied, info only). |
Tsb | Top side bearing (already applied, info only). |
HaveBBox | If true, BBox was computed. |
BBox | Bounding box of the glyph outline. |
Outline | Outlines. |
Size | Number 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