- 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.
13 lines
277 B
C++
13 lines
277 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "HyphenationCommon.h"
|
|
|
|
class LanguageHyphenator {
|
|
public:
|
|
virtual ~LanguageHyphenator() = default;
|
|
virtual Script script() const = 0;
|
|
virtual std::vector<size_t> breakIndexes(const std::vector<CodepointInfo>& cps) const = 0;
|
|
};
|