Repository navigation
Releases
Releases · Rahiche/text_on_path
text_on_path 0.1.1
A crash fix, a shorter README and three more demos. Also on pub.dev.
- Fixes a crash (a
RangeErrorwhile shaping) for large text at a high pixel ratio, such as 140 px at 2 × the default oversample. The atlas now packs about as wide as tall, and is drawn at a lower density when it wouldn't fit a GPU texture. - An atlas for a zoomed view that can't be drawn falls back to the traced outlines instead of throwing.
- A shorter README: what it does, demos and links. The details have pages of their own: Getting started and How it works.
- Three more demos: selecting text on a curve, a seal filling as its joins are drawn out, and text following a curve drawn by hand.
text_on_path 0.1.0
The first release: text along any curve, with cursive scripts kept joined. Also on pub.dev:
flutter pub add text_on_pathTry it in your browser: every script on circles, S-curves and curves you draw, seals, and selection.
TextOnPath: text along aPathCurve(anyPath, or a circular arc for a seal), cursive joins kept closed. Arabic, Persian and Urdu stay connected; Devanagari and Bengali keep their headline.- Joined placement: letters stand rigid, and only the rows they join on follow the curve. A widened join is drawn out along the curve; a sloping one (Nastaliq, a script hand) is pulled shut. Rigid and plain-warp placements to compare.
- Fitting to a length: kashida for Arabic, tracking that draws joins out rather than opening them, or word spacing.
- Sharp at any zoom: the atlas is drawn again for the scale the text is shown at, and past a memory budget the text is drawn from traced outlines (
TextOnPathRendering). TextOutlinesandTextOnPathPlacement.toSvg/toPdf: the placed text as vectors.- Selection inside a
SelectionArea: drag, double-click a word, long-press for handles, copy. Positions come from the straight line the text was shaped as; the highlight bends with the curve and the handles turn with it. TextOnPathMetrics: the area of gaps and overlaps at joins, how many joins visibly open, and how far letters were distorted.
Needs Flutter 3.29 or later.

