REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.49 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/fontkit/src/layout/GlyphRun.js
Text
Base64
import BBox from '../glyph/BBox'; import * as Script from '../layout/Script'; /** * Represents a run of Glyph and GlyphPosition objects. * Returned by the font layout method. */ export default class GlyphRun { constructor(glyphs, features, script, language, direction) { /** * An array of Glyph objects in the run * @type {Glyph[]} */ this.glyphs = glyphs; /** * An array of GlyphPosition objects for each glyph in the run * @type {GlyphPosition[]} */ this.positions = null; /** * The script that was requested for shaping. This was either passed in or detected automatically. * @type {string} */ this.script = script; /** * The language requested for shaping, as passed in. If `null`, the default language for the * script was used. * @type {string} */ this.language = language || null; /** * The direction requested for shaping, as passed in (either ltr or rtl). * If `null`, the default direction of the script is used. * @type {string} */ this.direction = direction || Script.direction(script); /** * The features requested during shaping. This is a combination of user * specified features and features chosen by the shaper. * @type {object} */ this.features = {}; // Convert features to an object if (Array.isArray(features)) { for (let tag of features) { this.features[tag] = true; } } else if (typeof features === 'object') { this.features = features; } } /** * The total advance width of the run. * @type {number} */ get advanceWidth() { let width = 0; for (let position of this.positions) { width += position.xAdvance; } return width; } /** * The total advance height of the run. * @type {number} */ get advanceHeight() { let height = 0; for (let position of this.positions) { height += position.yAdvance; } return height; } /** * The bounding box containing all glyphs in the run. * @type {BBox} */ get bbox() { let bbox = new BBox; let x = 0; let y = 0; for (let index = 0; index < this.glyphs.length; index++) { let glyph = this.glyphs[index]; let p = this.positions[index]; let b = glyph.bbox; bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); x += p.xAdvance; y += p.yAdvance; } return bbox; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
GlyphPosition.js
815 B
lrw-r--r--
2026-02-14 19:19:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
GlyphRun.js
2.49 KB
lrw-r--r--
2026-02-14 19:19:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
KernProcessor.js
2.49 KB
lrw-r--r--
2026-02-14 19:19:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LayoutEngine.js
5.66 KB
lrw-r--r--
2026-02-14 19:19:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Script.js
5.32 KB
lrw-r--r--
2026-02-14 19:19:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
UnicodeLayoutEngine.js
6.66 KB
lrw-r--r--
2026-02-14 19:19:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).