estimateTextSize() now tries opentype.js per-glyph advance widths before falling back to the rough 0.6 × fontSize × charCount heuristic. Since font data is already cached via loadFont(), this gives accurate variable-width measurement for any loaded font — no CanvasKit needed. Parsed opentype.js Font objects are cached per family+style to avoid reparsing on every layout pass. |
||
|---|---|---|
| .. | ||
| clipboard-derived-text.ts | ||
| direction.ts | ||
| editor.ts | ||
| fonts.ts | ||
| index.ts | ||
| opentype.ts | ||
| style-runs.ts | ||