| 448 | } |
| 449 | |
| 450 | int ParsedText::resolveFirstLineIndent(const bool isFirstLine, const GfxRenderer& renderer, const int fontId) const { |
| 451 | if (!isFirstLine || !isNaturalAlign) { |
| 452 | return 0; |
| 453 | } |
| 454 | if (blockStyle.textIndentDefined) { |
| 455 | if (blockStyle.textIndent < 0 || !extraParagraphSpacing) { |
| 456 | return blockStyle.textIndent; |
| 457 | } |
| 458 | return 0; |
| 459 | } |
| 460 | if (!extraParagraphSpacing) { |
| 461 | return renderer.getSpaceWidth(fontId, EpdFontFamily::REGULAR) * 3; |
| 462 | } |
| 463 | return 0; |
| 464 | } |
| 465 | // Consumes data to minimize memory usage |
| 466 | void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fontId, const uint16_t viewportWidth, |
| 467 | const std::function<void(std::shared_ptr<TextBlock>)>& processLine, |
nothing calls this directly
no test coverage detected