hyphenation 1.0.2 copy "hyphenation: ^1.0.2" to clipboard
hyphenation: ^1.0.2 copied to clipboard

Correct, fast TeX-pattern hyphenation for Dart: pattern compilation, word breaking and greedy line breaking, with no Flutter dependency.

Changelog #

1.0.2 #

  • The SDK constraint is now ^3.5.0, so the package resolves on older stable Dart releases. No API or behaviour changes.

1.0.1 #

  • The LICENSE file is now the plain MIT text so pub.flutter-io.cn recognizes it; the pattern-file notices moved to NOTICE.md.
  • The package ships example/example.dart.
  • Hyphenator.cacheSplitParts, an opt-in bound-sharing cache of the parts split returns. Off by default: it retains each word's text a second time, cut up, in exchange for turning a repeated split into a map lookup.
  • split allocates its result once at its final size, and marking a word no longer allocates a lower-cased copy of it to probe an empty exception map.
  • Cached break offsets are retained in the narrowest integer width that holds them, rather than one tagged word each. They are still unmodifiable.

1.0.0 #

Initial release.

  • Hyphenator, splitting words with a compiled TeX pattern set, with an LRU cache over the words it has already seen.
  • Hyphenator.fromSource and TexHyphenationPatterns, compiling pattern file text into a trie held in flat typed arrays and shareable between hyphenators.
  • HyphenLineBreaker, greedy width-aware line breaking driven by a caller supplied measurement function.
  • DanglingWords, an allocation-free probe table of words to keep with the word that follows them.
  • minifyTexPatterns, stripping a pattern file down to its \patterns and \hyphenation groups.
0
likes
160
points
357
downloads

Documentation

API reference

Publisher

verified publisherarxdeus.dev

Weekly Downloads

Correct, fast TeX-pattern hyphenation for Dart: pattern compilation, word breaking and greedy line breaking, with no Flutter dependency.

Homepage
Repository (GitHub)
View/report issues

Topics

#text #typography #hyphenation

License

MIT (license)

Dependencies

characters, meta

More

Packages that depend on hyphenation