@ooxml-sanad/text
v0.2.0
Published
Font resolution, shaping, segmentation, bidi, measurement cache.
Readme
@ooxml/text
Text shaping engine: font resolution, glyph shaping, segmentation, bidirectional text, and measurement cache.
Install
npm install @ooxml/textOverview
Turns raw text runs into shaped glyph arrays ready for painting:
- Font resolution — Maps
w:rFontsattributes to available font files - Shaping — OpenType layout, glyph substitution, positioning
- Segmentation — Line-break opportunities, word boundaries
- Bidi — UAX #9 bidirectional text reordering
- Measurement — Width/height cache for layout
- CJK vertical — Vertical writing mode support
- ODTTF — Subset font handling for embedded fonts
Usage
import { shapeText, measureRun } from '@ooxml/text';License
MIT
