A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only indent paragraphs for justify/left-align (#367)

Currently, when Extra Paragraph Spacing is off, an em-space is added to
the beginning of each ParsedText even for blocks like headers that are
centered. This whitespace makes the centering slightly off. Change the
calculation here to only add the em-space for left/justified text.

Co-authored-by: Maeve Andrews <maeve@git.mail.maeveandrews.com>

authored by

Maeve Andrews
Maeve Andrews
and committed by
GitHub
48922083 3ee10b31

+1 -1
+1 -1
lib/Epub/Epub/ParsedText.cpp
··· 43 43 wordWidths.reserve(totalWordCount); 44 44 45 45 // add em-space at the beginning of first word in paragraph to indent 46 - if (!extraParagraphSpacing) { 46 + if ((style == TextBlock::JUSTIFIED || style == TextBlock::LEFT_ALIGN) && !extraParagraphSpacing) { 47 47 std::string& first_word = words.front(); 48 48 first_word.insert(0, "\xe2\x80\x83"); 49 49 }