mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 07:07:41 +03:00
Changed size of indent to 1 em.
This commit is contained in:
parent
b45d0238f4
commit
b372353a01
@ -123,8 +123,11 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo
|
|||||||
|
|
||||||
// Calculate spacing
|
// Calculate spacing
|
||||||
int spareSpace = pageWidth - lineWordWidthSum;
|
int spareSpace = pageWidth - lineWordWidthSum;
|
||||||
|
// width of 1em to indent first line of paragraph
|
||||||
|
const int indentWidth = 1 * renderer.getTextWidth(fontId, "m", REGULAR);
|
||||||
|
|
||||||
if (!extraParagraphSpacing && wordWidthIndex ==0) {
|
if (!extraParagraphSpacing && wordWidthIndex ==0) {
|
||||||
spareSpace -= 3*spaceWidth;
|
spareSpace -= indentWidth;
|
||||||
}
|
}
|
||||||
int spacing = spaceWidth;
|
int spacing = spaceWidth;
|
||||||
const bool isLastLine = lineBreak == totalWordCount;
|
const bool isLastLine = lineBreak == totalWordCount;
|
||||||
@ -136,7 +139,7 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo
|
|||||||
// Calculate initial x position
|
// Calculate initial x position
|
||||||
uint16_t xpos = 0;
|
uint16_t xpos = 0;
|
||||||
if (!extraParagraphSpacing && wordWidthIndex ==0) {
|
if (!extraParagraphSpacing && wordWidthIndex ==0) {
|
||||||
xpos = 3*spaceWidth;
|
xpos = indentWidth;
|
||||||
}
|
}
|
||||||
if (style == TextBlock::RIGHT_ALIGN) {
|
if (style == TextBlock::RIGHT_ALIGN) {
|
||||||
xpos = spareSpace - (lineWordCount - 1) * spaceWidth;
|
xpos = spareSpace - (lineWordCount - 1) * spaceWidth;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user