Skip to content

@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 ​

ParameterTypeDefault valueDescription
xAdvancenumber0the amount to move the virtual pen in the X direction after rendering this glyph.
yAdvancenumber0the amount to move the virtual pen in the Y direction after rendering this glyph.
xOffsetnumber0the offset from the pen position in the X direction at which to render this glyph.
yOffsetnumber0the offset from the pen position in the y direction at which to render this glyph.

Returns ​

GlyphPosition

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
xAdvancepublicnumber0the amount to move the virtual pen in the X direction after rendering this glyph.src/layout/glyph-position.ts:14
xOffsetpublicnumber0the offset from the pen position in the X direction at which to render this glyph.src/layout/glyph-position.ts:16
yAdvancepublicnumber0the amount to move the virtual pen in the Y direction after rendering this glyph.src/layout/glyph-position.ts:15
yOffsetpublicnumber0the offset from the pen position in the y direction at which to render this glyph.src/layout/glyph-position.ts:17