mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 06:37:38 +03:00
Round correctly and remove debug print.
This commit is contained in:
parent
1a7fed2a69
commit
2f57565b9d
@ -68,8 +68,7 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo
|
|||||||
applyParagraphIndent();
|
applyParagraphIndent();
|
||||||
|
|
||||||
const int pageWidth = viewportWidth;
|
const int pageWidth = viewportWidth;
|
||||||
const int spaceWidth = static_cast<float>(wordSpacing) / 100.0 * renderer.getSpaceWidth(fontId);
|
const int spaceWidth = std::round(static_cast<float>(wordSpacing) / 100.0 * renderer.getSpaceWidth(fontId));
|
||||||
Serial.printf("[%lu] [PaT] wordSpacing: %d spaceWidth: %d\n", millis(), wordSpacing, spaceWidth);
|
|
||||||
auto wordWidths = calculateWordWidths(renderer, fontId);
|
auto wordWidths = calculateWordWidths(renderer, fontId);
|
||||||
std::vector<size_t> lineBreakIndices;
|
std::vector<size_t> lineBreakIndices;
|
||||||
if (hyphenationEnabled) {
|
if (hyphenationEnabled) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user