MCPcopy Index your code
hub / github.com/phaserjs/phaser / makeGlyph

Function makeGlyph

tests/gameobjects/bitmaptext/GetBitmapTextSize.test.js:4–14  ·  view source on GitHub ↗
(xAdvance, xOffset, yOffset, width, height)

Source from the content-addressed store, hash-verified

2
3// Helper to create a basic glyph object
4function makeGlyph (xAdvance, xOffset, yOffset, width, height)
5{
6 return {
7 xAdvance: xAdvance,
8 xOffset: xOffset !== undefined ? xOffset : 0,
9 yOffset: yOffset !== undefined ? yOffset : 0,
10 width: width !== undefined ? width : xAdvance,
11 height: height !== undefined ? height : 10,
12 kerning: {}
13 };
14}
15
16// Helper to create a basic src mock with sensible defaults
17function makeSrc (text, options)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…