Skip to main content
Module

x/targadactyl/deps.ts>GlyphRun

tga.js implemented in Deno
Latest
interface GlyphRun
import { type GlyphRun } from "https://deno.land/x/targadactyl@1.2.0/deps.ts";

Information for a run of shaped text. See Paragraph.getShapedLines()

Notes: positions is documented as Float32, but it holds twice as many as you expect, and they are treated logically as pairs of floats: {x0, y0}, {x1, y1}, ... for each glyph.

positions and offsets arrays have 1 extra slot (actually 2 for positions) to describe the location "after" the last glyph in the glyphs array.

Properties

typeface: Typeface
size: number
fakeBold: boolean
fakeItalic: boolean
glyphs: Uint16Array
positions: Float32Array
offsets: Uint32Array
flags: number