vyaz-monorepo / core/src / measurePx
Function: measurePx()
measurePx(
raw,scale,fontSize,text,prof?):number
Defined in: core/src/measure/FontkitMeasureContext.ts:211
Pixel width of text under profile. Shared by the pretext measure context and ParagraphLayoutEngine's fragment measurement so line breaking and positioning never disagree.
advance— Σ per-code-pointadvanceWidth, surrogate-aware, with theMISSING_GLYPH_FACTOR · fontSizeestimate for absent glyphs.shape— fontkitlayout()advance (kerning + ligatures). Missing glyphs there fall back to the same per-code-point estimate for the stretch that produced no advance, so the two profiles agree on un-shapeable text.
Parameters
raw
any
scale
number
fontSize
number
text
string
prof?
MeasureProfile = profile
Returns
number
