Add comments to clarify hyphenation logic and structure in Epub processing

This commit is contained in:
Arthur Tazhitdinov
2025-12-18 20:08:31 +05:00
parent c813a2f075
commit 63668708bc
7 changed files with 26 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
class GfxRenderer;
// Holds the split portions of a hyphenated word.
struct HyphenationResult {
std::string head;
std::string tail;
@@ -13,6 +14,7 @@ struct HyphenationResult {
class Hyphenator {
public:
// Splits a word so it fits within availableWidth, appending a hyphen to the head when needed.
static bool splitWord(const GfxRenderer& renderer, int fontId, const std::string& word, EpdFontStyle style,
int availableWidth, HyphenationResult* result, bool force);
};