Skip to content

Conversation

@osteotek
Copy link
Contributor

@osteotek osteotek commented Dec 17, 2025

Summary

  • Added EnglishHyphenator and RussianHyphenator classes to handle language-specific hyphenation rules.
  • Introduced HyphenationCommon for shared utilities and character classification functions.
  • Updated ParsedText to utilize hyphenation when laying out text.

Additional Context

  • Hyphenation engine is very naive, based on vowels and diphthongs, not using any tables, exceptions, etc.

image-1765983784590

- Added EnglishHyphenator and RussianHyphenator classes to handle language-specific hyphenation rules.
- Introduced HyphenationCommon for shared utilities and character classification functions.
- Updated ParsedText to utilize hyphenation when laying out text.
- Enhanced the hyphenation logic to consider word splitting based on available width and character properties.
- Refactored existing code to improve readability and maintainability, including the use of iterators and lambda functions for line processing.
- Added necessary includes and organized header files for better structure.
@osteotek osteotek changed the title WIP: Implement hyphenation support for English and Russian languages WIP: Simple hyphenation support Dec 18, 2025
- Introduced hyphenationEnabled flag in ParsedText and Section classes.
- Updated constructors and methods to handle hyphenation settings.
- Modified settings file versioning to include hyphenationEnabled.
- Enhanced settings UI to allow toggling of hyphenation feature.
@daveallie daveallie added enhancement New feature or request reader Related to the core reader experience labels Dec 19, 2025
@osteotek
Copy link
Contributor Author

@daveallie I'll get this PR ready for review tomorrow

…te logic to remove surrounding punctuation; add explicit hyphen handling in breakOffsets function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request reader Related to the core reader experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants