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.
This commit is contained in:
Arthur Tazhitdinov
2025-12-17 18:10:58 +03:00
parent d429966dd4
commit 26b84b38a2
10 changed files with 979 additions and 120 deletions

View File

@@ -0,0 +1,14 @@
#pragma once
#include "LanguageHyphenator.h"
class RussianHyphenator final : public LanguageHyphenator {
public:
static const RussianHyphenator& instance();
Script script() const override;
std::vector<size_t> breakIndexes(const std::vector<CodepointInfo>& cps) const override;
private:
RussianHyphenator() = default;
};