/** * The visual side(s) of its cell a glyph joins on: 'left', 'right', 'both', or null for a glyph * that stands alone. A presentation form says so through its shaping context; any other * right-to-left glyph says so directly with ZERO WIDTH JOINER — before the letter joins the preceding letter, which sits to the * right; after it joins the following one, to the left. */ export declare function joiningSide(glyph: string): 'left' | 'right' | 'both' | null; /** * The text that shapes to a glyph: an Arabic presentation form's base letter in joining context, * anything else as it is. Drawing this instead of the presentation-form code point keeps the * form in the profile's own font even when that font leaves the presentation block unmapped. */ export declare function shapingText(glyph: string): string; /** * The text drawn for a glyph that joins: the glyph with `count` tatweels (kashida, the stroke * Arabic calligraphy stretches to justify a line) on each side it joins, so its connecting stroke * runs past the cell edge and is clipped there, meeting the stroke of the next cell. Tatweel goes * before the letter for a join on the right, since right is where a right-to-left script's * preceding letter sits; after it for a join on the left. A glyph that joins nothing is returned * as it is, and tatweel itself becomes a run of tatweel, a bare stroke across the whole cell. */ export declare function kashidaText(glyph: string, count: number): string; /** * Where to start drawing a glyph in its cell, in the units the widths are in. * * `bodyWidth` is the glyph alone; `runWidth` is what is actually drawn, which for a joining * glyph under kashidaText includes its tatweels. A glyph that joins nothing is centred. One that * joins on its left sits flush right, with any tatweel running out past the left edge; one that * joins on its right mirrors that, except without tatweel it has to sit flush right itself for * its stroke to reach the edge. Medial forms keep their letter centred and overflow both ways. * Floored, so a glyph as wide as its cell starts at 0 whichever it is. */ export declare function glyphOffset(glyph: string, bodyWidth: number, cellWidth: number, runWidth?: number): number;