@vectojs/text
v0.4.1
Published
Standalone text-shaping primitives for VectoJS: BiDi resolution, Arabic shaping, CSS-parity typography metrics, MSDF font parsing, and prepared content grids.
Maintainers
Readme
@vectojs/text
Standalone text-shaping primitives for VectoJS.
These are the low-level, renderer-agnostic building blocks that the layout engine
and scene-graph runtime consume. They have no dependency on the scene graph, DOM,
or a renderer, so they can be used on their own (including in workers). Higher-level
text components (Text, RichText, Markdown) live in @vectojs/ui; the
Entity-based MSDFTextEntity / SVGEntity stay in @vectojs/core.
@vectojs/core re-exports everything here for backward compatibility.
Exports
BidiResolver— Unicode BiDi resolution (wrapsbidi-js).ArabicShaper— Arabic contextual glyph shaping.Typography— CSS-parity line-box / baseline metrics.MSDFFont— multi-channel signed-distance-field font parsing.PreparedContentGrid— prepared, shaped content grid for measured text.
Install
bun add @vectojs/textUsage
import { BidiResolver, prepareContentGrid } from '@vectojs/text';