mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 15:17:37 +03:00
clang format fix
This commit is contained in:
parent
e46a271c12
commit
54669a8fd4
@ -1,7 +1,6 @@
|
||||
#include "ParsedText.h"
|
||||
|
||||
#include <GfxRenderer.h>
|
||||
#include "hyphenation/Hyphenator.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
@ -10,6 +9,8 @@
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include "hyphenation/Hyphenator.h"
|
||||
|
||||
constexpr int MAX_COST = std::numeric_limits<int>::max();
|
||||
|
||||
void ParsedText::addWord(std::string word, const EpdFontFamily::Style fontStyle) {
|
||||
@ -154,8 +155,7 @@ void ParsedText::applyParagraphIndent() {
|
||||
words.front().insert(0, "\xe2\x80\x83");
|
||||
}
|
||||
|
||||
void ParsedText::ensureHyphenationFitsViewport(const GfxRenderer& renderer, const int fontId,
|
||||
const int viewportWidth) {
|
||||
void ParsedText::ensureHyphenationFitsViewport(const GfxRenderer& renderer, const int fontId, const int viewportWidth) {
|
||||
if (!hyphenationEnabled || viewportWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ class ParsedText {
|
||||
void applyParagraphIndent();
|
||||
void ensureHyphenationFitsViewport(const GfxRenderer& renderer, int fontId, int viewportWidth);
|
||||
std::vector<std::string> hyphenateWordToFit(const std::string& word, const GfxRenderer& renderer, int fontId,
|
||||
EpdFontFamily::Style style, int viewportWidth) const;
|
||||
EpdFontFamily::Style style, int viewportWidth) const;
|
||||
std::vector<size_t> computeHyphenatedLineBreaks(const GfxRenderer& renderer, int fontId, int pageWidth,
|
||||
int spaceWidth, std::vector<uint16_t>& wordWidths);
|
||||
bool hyphenateWordAtIndex(size_t wordIndex, int availableWidth, const GfxRenderer& renderer, int fontId,
|
||||
|
||||
@ -179,7 +179,7 @@ bool Section::createSectionFile(const int fontId, const float lineCompression, c
|
||||
viewportHeight, hyphenationEnabled);
|
||||
std::vector<uint32_t> lut = {};
|
||||
|
||||
ChapterHtmlSlimParser visitor(
|
||||
ChapterHtmlSlimParser visitor(
|
||||
tmpHtmlPath, renderer, fontId, lineCompression, extraParagraphSpacing, paragraphAlignment, viewportWidth,
|
||||
viewportHeight, hyphenationEnabled,
|
||||
[this, &lut](std::unique_ptr<Page> page) { lut.emplace_back(this->onPageComplete(std::move(page))); },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user