Hi, first of all: pretext is excellent for dynamic line routing. We’re evaluating it for a page-like productivity UI where text reflows around moving objects, and the core layout behavior is very promising.
One gap we ran into is hyphenation in a pretext-first architecture.
Our use case:
- user-generated text in a todo / notes app
- short editable entries, not just editorial paragraphs
- mixed language is common
- product names, names, brands, places, and casual phrases appear frequently
- text is manually laid out with
prepareWithSegments(...) + layoutNextLine(...)
- dynamic obstacle-aware reflow is the priority
- hyphenation is secondary, but still important for production quality
What we found:
- browser
hyphens: auto is not directly usable once text is rendered through pretext instead of normal DOM layout
- external pattern-based hyphenation can help, but can also produce visibly bad breaks on user text, especially with mixed language or uncommon words
- for app-like text, a wrong hyphenation is often worse than no hyphenation
Suggestion / request:
It would be very helpful if the docs discussed production approaches for hyphenation when using pretext for manual layout, for example:
- recommended strategy for integrating external hyphenation before
prepareWithSegments(...)
- whether soft hyphens are the intended interoperability path
- guidance for user-generated text vs editorial text
- recommendations around language tagging / locale handling
- known tradeoffs with mixed-language content, names, brands, and short UI/task text
- whether a conservative “hyphenate only some tokens” approach is recommended
- maybe an example demo combining
layoutNextLine(...) with optional hyphenation input
A concrete docs/example page around “Pretext + hyphenation for manual layout” would be very valuable.
Thanks again for the library. The dynamic layout side is genuinely exciting.
Hi, first of all:
pretextis excellent for dynamic line routing. We’re evaluating it for a page-like productivity UI where text reflows around moving objects, and the core layout behavior is very promising.One gap we ran into is hyphenation in a
pretext-first architecture.Our use case:
prepareWithSegments(...)+layoutNextLine(...)What we found:
hyphens: autois not directly usable once text is rendered throughpretextinstead of normal DOM layoutSuggestion / request:
It would be very helpful if the docs discussed production approaches for hyphenation when using
pretextfor manual layout, for example:prepareWithSegments(...)layoutNextLine(...)with optional hyphenation inputA concrete docs/example page around “Pretext + hyphenation for manual layout” would be very valuable.
Thanks again for the library. The dynamic layout side is genuinely exciting.