Skip to content
pubscout

hyphenatorx

1.5.11, released 3 years ago by novelplotter.com

Implementation of a TeX-based hyphenation algorithm for various languages in Flutter.

WASM-ready
$ flutter pub add hyphenatorx
Source repository

What it does

Provides text hyphenation widgets and utilities based on TeX definitions. It supports multiple languages via synchronous loading or asynchronous loading from local assets, caching hyphenated words, and returning syllables or wrapped text results.

AI-written summary of version 1.5.11, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need automatic text hyphenation for western or supported non-western languages.
  • You want to use a custom widget that hyphenates and wraps text based on available width.

Skip it when

  • You need hyphenation for languages that have not been evaluated or included in the TeX patterns.
  • You require extreme high performance without internal letter-testing overhead for very large texts.

Strengths

  • Supports over 70 languages using standard TeX hyphenation definitions.
  • Offers both synchronous and asynchronous loading of language data.
  • Includes built-in caching for hyphenated and non-hyphenated words.

Weaknesses

  • Internal is-letter-testing can impact performance for large texts.
  • Some non-western languages may require evaluation for proper behavior.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Optionally load language data as assets if using asynchronous loading, or import the language configuration directly.

import 'package:hyphenatorx/widget/texthyphenated.dart';

TextHyphenated('subdivision', 'en_us', style: TextStyle(fontSize: 56));

Alternatives

Packages that do the same job and could replace hyphenatorx.

  • flutter_locales

    Easily localize Flutter apps using JSON files with dynamic locale switching and persistent storage.