mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
fix compilation errors
This commit is contained in:
parent
750a6ee1d8
commit
5c9412b141
@ -99,7 +99,8 @@ std::vector<uint16_t> ParsedText::calculateWordWidths(const GfxRenderer& rendere
|
||||
uint16_t width = measureWordWidth(renderer, fontId, *wordsIt, *wordStylesIt);
|
||||
|
||||
// Add CSS text-indent to first word width
|
||||
if (isFirst && blockStyle.textIndent > 0 && shouldIndent) {
|
||||
if (isFirst && blockStyle.textIndent > 0 && (style == TextBlock::JUSTIFIED || style == TextBlock::LEFT_ALIGN) &&
|
||||
!extraParagraphSpacing) {
|
||||
width += static_cast<uint16_t>(blockStyle.textIndent);
|
||||
isFirst = false;
|
||||
} else {
|
||||
|
||||
@ -36,9 +36,11 @@ class ParsedText {
|
||||
|
||||
public:
|
||||
explicit ParsedText(const TextBlock::Style style, const bool extraParagraphSpacing,
|
||||
const bool hyphenationEnabled = false,
|
||||
const BlockStyle& blockStyle = BlockStyle()))
|
||||
: style(style), extraParagraphSpacing(extraParagraphSpacing), hyphenationEnabled(hyphenationEnabled, blockStyle(blockStyle)) {}
|
||||
const bool hyphenationEnabled = false, const BlockStyle& blockStyle = BlockStyle())
|
||||
: style(style),
|
||||
blockStyle(blockStyle),
|
||||
extraParagraphSpacing(extraParagraphSpacing),
|
||||
hyphenationEnabled(hyphenationEnabled) {}
|
||||
~ParsedText() = default;
|
||||
|
||||
void addWord(std::string word, EpdFontFamily::Style fontStyle, bool underline = false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user