@pdfa-lab/fontkit / GlyphPosition
Class: GlyphPosition ​
Defined in: src/layout/glyph-position.ts:4
Represents positioning information for a glyph in a GlyphRun.
Constructors ​
Constructor ​
new GlyphPosition(
xAdvance?,yAdvance?,xOffset?,yOffset?):GlyphPosition
Defined in: src/layout/glyph-position.ts:13
Create a position.
Parameters ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
xAdvance | number | 0 | the amount to move the virtual pen in the X direction after rendering this glyph. |
yAdvance | number | 0 | the amount to move the virtual pen in the Y direction after rendering this glyph. |
xOffset | number | 0 | the offset from the pen position in the X direction at which to render this glyph. |
yOffset | number | 0 | the offset from the pen position in the y direction at which to render this glyph. |
Returns ​
GlyphPosition
Properties ​
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
xAdvance | public | number | 0 | the amount to move the virtual pen in the X direction after rendering this glyph. | src/layout/glyph-position.ts:14 |
xOffset | public | number | 0 | the offset from the pen position in the X direction at which to render this glyph. | src/layout/glyph-position.ts:16 |
yAdvance | public | number | 0 | the amount to move the virtual pen in the Y direction after rendering this glyph. | src/layout/glyph-position.ts:15 |
yOffset | public | number | 0 | the offset from the pen position in the y direction at which to render this glyph. | src/layout/glyph-position.ts:17 |