morphtext 0.2.1
morphtext: ^0.2.1 copied to clipboard
Text that morphs letter by letter, outline into outline: weight, size, font, one word into another, or into an icon. Built on morphnext's outline engine.
0.2.1 #
- Depends on
morphnext: ^0.7.1instead of pinning0.6.1, so apps can use morphtext alongside current morphnext. MorphText now reads glyphs and plans morphs through morphnext's public glyph API (MorphFont,MorphOutline,MorphOutlinePlan), which shipped in 0.7.0. Thanks to KickNext, who shipped the API and ported morphtext onto it (#1). Morphs look the same; in a few letter pairs, points in mid-flight frames pair slightly differently.
0.2.0 #
-
The system font morphs on iOS, with nothing bundled. SF Pro can't ship in an app (TN3214), so it was never in
FontManifest.jsonand morphed as plain text switching at the middle. A style that names no family, orCupertinoSystemTextorCupertinoSystemDisplay, now reads the font iOS draws it with: CoreText's tables, throughdart:ffi(public API), read once in memory. Each weight is read where Flutter draws it on SF's axes, measured on an iPhone (iOS 26) againstText: 95-98% of the same pixels at 64 px. Other platforms are unchanged. -
Variable fonts morph at the
wghtandopszeach style'sfontVariationsasks for, instead of always at the font's default instance. -
Three examples for the system font, run on an iPhone:
example/lib/system_font_main.dart(morphs, and a check of the outlines againstText), and two reels that render themselves frame by frame on the phone,system_font_reel.dartandsystem_font_flyer.dart. -
A second example, Records (
example/lib/records.dart): MorphText in a Hero flight, a title morphing from the list's style to the page's as it flies. The README's In a Hero covers the two things that make it look right: a transparentMaterialaround the shuttle, and a straightRectTweenfor square artwork.
0.1.2 #
- A word and an icon now morph as one shape, every letter from its place in
the word, instead of each letter carrying its own copy of the icon. The
copies drifted apart as the morph began and covered each other's holes,
so an outline icon (Tabler, Lucide, Material's
_borderand_outlineicons) turned solid before it started to change. Letters with nothing to become now shrink away rather than all flowing into the icon.
0.1.1 #
- A shorter package description, within pub.dev's 180 characters.
- Changelog tidy-up.
0.1.0 #
First release.
MorphText: text morphing letter by letter, driven byprogress(anAnimation<double>, as morphnext'sMorphIcontakes it), between any two styles (weight, size, colour, slant, or one font family into another) and, withtoText, from one word into another. Plain text at either end.AnimatedMorphText: springs to each new text and style with morphnext'sMorphSprings.snappyby default (re-exported; anySpringDescriptionworks), reversing mid-flight from where it is and keeping its velocity; or along an optionalcurveover a fixedduration. Plain text at rest, faded in over the outlines in the last of the motion (handoff, 0.1 by default) so nothing changes after it lands.MorphTextandMorphBetweentakehandofftoo, 0 by default.MorphContent,MorphBetweenandAnimatedMorph: text and icons morph into each other (a word flows into an icon, an icon into another), read from any bundled icon font; each end is pixel for pixel aTextorIcon.- Letters pair by a weighted edit distance; leftover letters shrink to or grow from a point.
- Extracted from an app we're building, where it carries a name from a light title to a card's bold one.