Skip to content

text_on_path 0.1.0

Choose a tag to compare

@Rahiche Rahiche released this 29 Oct 03:59
· 4 commits to main since this release

The first release: text along any curve, with cursive scripts kept joined. Also on pub.dev:

flutter pub add text_on_path

Try it in your browser: every script on circles, S-curves and curves you draw, seals, and selection.

Hindi and Urdu on a circle that bends: each cluster turned rigidly opens the joins; text_on_path keeps them closed

  • TextOnPath: text along a PathCurve (any Path, 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).
  • TextOutlines and TextOnPathPlacement.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.