Commit Graph

12 Commits

Author SHA1 Message Date
Arthur Tazhitdinov
54d7a9437e Merge branch 'master' into hyphenation-v2 2025-12-25 19:41:27 +05:00
Dave Allie
424104f8ff
Fix incorrect justification of last line in paragraph (#90)
## Summary

* Fix incorrect justification of last line in paragraph
* `words` is changing size due to the slice, so `isLastLine` would
rarely be right, either removing justification mid-paragraph, or
including it in the last line.

## Additional Context

* Introduced in #73
2025-12-21 19:01:00 +11:00
Dave Allie
299623927e
Build out lines when parsing html and holding >750 words in buffer (#73)
## Summary

* Build out lines for pages when holding over 750 buffered words
* Should fix issues with parsing long blocks of text causing memory
crashes
2025-12-21 13:43:19 +11:00
Arthur Tazhitdinov
ca88c2eef7 Add hyphenation support and update settings management
- 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.
2025-12-19 12:41:35 +05:00
Arthur Tazhitdinov
b768c4ba89 comments 2025-12-19 10:43:15 +05:00
Jonas Diemer
d86b3fe134
Bugfix/word spacing indented (#59)
Some checks are pending
CI / build (push) Waiting to run
Simplified the indentation to fix having too large gaps between words
(original calculation was inaccurate).
2025-12-19 08:45:20 +11:00
Arthur Tazhitdinov
63668708bc Add comments to clarify hyphenation logic and structure in Epub processing 2025-12-18 20:08:31 +05:00
Arthur Tazhitdinov
13a6c43b87 clang format fix 2025-12-17 18:24:09 +03:00
Arthur Tazhitdinov
26b84b38a2 Implement hyphenation support for English and Russian languages
- 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.
2025-12-17 18:10:58 +03:00
Jonas Diemer
def7abbd60
Improve indent (#28)
* add horizontal indent in first line of paragraph in case Extra Paragraph Spacing is OFF

* Treat tabs as whitespace (so they are properly stripped)

* Changed size of indent to 1 em.

* Fixed calculation of space when indenting (avoiding squeezed text).

* Source code formatting
2025-12-16 23:02:32 +11:00
Dave Allie
5bae283838
Process lines into pages as they are built 2025-12-13 20:10:16 +11:00
Dave Allie
69f357998e
Move to smart pointers and split out ParsedText class (#6)
* Move to smart pointers and split out ParsedText class

* Cleanup ParsedText

* Fix clearCache functions and clear section cache if page load fails

* Bump Page and Section file versions

* Combine removeDir implementations in Epub

* Adjust screen margins
2025-12-12 22:13:34 +11:00