Lines Matching +full:linebreak +full:- +full:style
51 Paragraph::Paragraph(ParagraphStyle style, sk_sp<FontCollection> fonts) in Paragraph() argument
53 , fParagraphStyle(std::move(style)) in Paragraph()
65 ParagraphStyle style, in ParagraphImpl() argument
70 : Paragraph(std::move(style), std::move(fonts)) in ParagraphImpl()
86 ParagraphStyle style, in ParagraphImpl() argument
92 std::move(style), in ParagraphImpl()
99 fText = fUnicode->convertUtf16ToUtf8(utf16text); in ParagraphImpl()
106 return -1; in unresolvedGlyphs()
132 this->fCodeUnitProperties.reset(); in layout()
133 this->fCodeUnitProperties.push_back_n(fText.size() + 1, CodeUnitFlags::kNoCodeUnitFlag); in layout()
134 this->fWords.clear(); in layout()
135 this->fBidiRegions.clear(); in layout()
136 this->fUTF8IndexForUTF16Index.reset(); in layout()
137 this->fUTF16IndexForUTF8Index.reset(); in layout()
138 this->fRuns.reset(); in layout()
139 if (!this->shapeTextIntoEndlessLine()) { in layout()
140 this->resetContext(); in layout()
141 // TODO: merge the two next calls - they always come together in layout()
142 this->resolveStrut(); in layout()
143 this->computeEmptyMetrics(); in layout()
144 this->fLines.reset(); in layout()
155 fLongestLine = FLT_MIN - FLT_MAX; // That is what flutter has in layout()
158 this->fOldWidth = floorWidth; in layout()
159 this->fOldHeight = this->fHeight; in layout()
167 this->fClusters.reset(); in layout()
168 this->resetShifts(); in layout()
169 this->fClustersIndexFromCodeUnit.reset(); in layout()
170 this->fClustersIndexFromCodeUnit.push_back_n(fText.size() + 1, EMPTY_INDEX); in layout()
171 this->buildClusterTable(); in layout()
173 this->spaceGlyphs(); in layout()
178 this->resetContext(); in layout()
179 this->resolveStrut(); in layout()
180 this->computeEmptyMetrics(); in layout()
181 this->fLines.reset(); in layout()
182 this->breakShapedTextIntoLines(floorWidth); in layout()
188 this->formatLines(fWidth); in layout()
192 this->fOldWidth = floorWidth; in layout()
193 this->fOldHeight = this->fHeight; in layout()
218 this->paintLines(canvas, x, y); in paint()
224 this->paintLinesIntoPicture(0, 0); in paint()
230 canvas->save(); in paint()
231 canvas->translate(x, y); in paint()
232 fPicture->playback(canvas); in paint()
233 canvas->restore(); in paint()
237 canvas->drawPicture(fPicture, &matrix, nullptr); in paint()
264 if (!fUnicode->getBidiRegions(fText.c_str(), fText.size(), textDirection, &fBidiRegions)) { in computeCodeUnitProperties()
269 fUnicode->forEachCodepoint(fText.c_str(), fText.size(), in computeCodeUnitProperties()
271 if (fUnicode->isWhitespace(unichar)) { in computeCodeUnitProperties()
276 if (fUnicode->isSpace(unichar)) { in computeCodeUnitProperties()
285 if (!fUnicode->getLineBreaks(fText.c_str(), fText.size(), &lineBreaks)) { in computeCodeUnitProperties()
288 for (auto& lineBreak : lineBreaks) { in computeCodeUnitProperties() local
289 …fCodeUnitProperties[lineBreak.pos] |= lineBreak.breakType == SkUnicode::LineBreakType::kHardLineBr… in computeCodeUnitProperties()
296 if (!fUnicode->getGraphemes(fText.c_str(), fText.size(), &graphemes)) { in computeCodeUnitProperties()
335 , fTextRange(text.begin() - fOwner->text().begin(), text.end() - fOwner->text().begin()) in Cluster()
347 if (text.end() - ch == 1 && *(unsigned char*)ch <= 0x7F) { in Cluster()
354 if (fOwner->codeUnitHasProperty(i, CodeUnitFlags::kPartOfWhiteSpaceBreak)) { in Cluster()
357 if (fOwner->codeUnitHasProperty(i, CodeUnitFlags::kPartOfIntraWordBreak)) { in Cluster()
365 fIsHardBreak = fOwner->codeUnitHasProperty(fTextRange.end, CodeUnitFlags::kHardLineBreakBefore); in Cluster()
373 shift = fShifts[clip ? end - 1 : end] - fShifts[start]; in calculateWidth()
378 correction = fJustificationShifts[end - 1].fX - in calculateWidth()
381 return posX(end) - posX(start) + shift + correction; in calculateWidth()
397 // Add info to cluster indexes table (text -> cluster) in buildClusterTable()
402 …fClusters.emplace_back(this, runIndex, 0ul, 1ul, this->text(run.textRange()), run.advance().fX, ru… in buildClusterTable()
414 // Add info to cluster indexes table (text -> cluster) in buildClusterTable()
418 SkSpan<const char> text(fText.c_str() + charStart, charEnd - charStart); in buildClusterTable()
427 fClusters.emplace_back(this, EMPTY_RUN, 0, 0, this->text({fText.size(), fText.size()}), 0, 0); in buildClusterTable()
448 Block* currentStyle = this->fTextStyles.begin(); in spaceGlyphs()
449 while (!cluster->startsIn(currentStyle->fRange)) { in spaceGlyphs()
451 SkASSERT(currentStyle != this->fTextStyles.end()); in spaceGlyphs()
454 SkASSERT(!currentStyle->fStyle.isPlaceholder()); in spaceGlyphs()
457 if (currentStyle->fStyle.getWordSpacing() != 0) { in spaceGlyphs()
458 if (cluster->isWhitespaceBreak() && cluster->isSoftBreak()) { in spaceGlyphs()
460 … shift += run.addSpacesAtTheEnd(currentStyle->fStyle.getWordSpacing(), cluster); in spaceGlyphs()
465 if (currentStyle->fStyle.getLetterSpacing() != 0) { in spaceGlyphs()
466 shift += run.addSpacesEvenly(currentStyle->fStyle.getLetterSpacing(), cluster); in spaceGlyphs()
469 if (soFarWhitespacesOnly && !cluster->isWhitespaceBreak()) { in spaceGlyphs()
482 // Check the font-resolved text against the cache in shapeTextIntoEndlessLine()
483 if (fFontCollection->getParagraphCache()->findParagraph(this)) { in shapeTextIntoEndlessLine()
508 fFontCollection->getParagraphCache()->updateParagraph(this); in shapeTextIntoEndlessLine()
531 …auto& line = this->addLine(offset, advance, textExcludingSpaces, text, textWithNewlines, clusters,… in breakShapedTextIntoLines()
565 SkCanvas* textCanvas = recorder.beginRecording(this->getMaxWidth(), this->getHeight()); in paintLinesIntoPicture()
583 auto strutStyle = this->paragraphStyle().getStrutStyle(); in resolveStrut()
588 …std::vector<sk_sp<SkTypeface>> typefaces = fFontCollection->findTypefaces(strutStyle.getFontFamili… in resolveStrut()
599 auto strutHeight = metrics.fDescent - metrics.fAscent; in resolveStrut()
612 fStrutMetrics.setForceStrut(this->paragraphStyle().getStrutStyle().getForceStrutHeight()); in resolveStrut()
633 // It's possible if some text is not covered with any text style in findAllBlocks()
681 // I don't know why - the solution I have here returns an empty box for every query that in getRectsForRange()
694 if (start > 0 && fUTF8IndexForUTF16Index[start - 1] == utf8) { in getRectsForRange()
703 //SkDebugf("getRectsForRange(%d,%d) -> (%d:%d)\n", start, end, text.start, text.end); in getRectsForRange()
752 // TODO: Optimize (save cluster <-> codepoint connection)
770 // (or the first one, or the only one - all the same) in getGlyphPositionAtCoordinate()
783 // By "glyph" they mean a character index - indicated by Minikin's code
787 if (!fUnicode->getWords(fText.c_str(), fText.size(), &fWords)) { in getWordBoundary()
805 //SkDebugf("getWordBoundary(%d): %d - %d\n", offset, start, end); in getWordBoundary()
834 return this->run(start.fRunIndex); in runByCluster()
872 this->resetContext(); in setState()
873 this->resolveStrut(); in setState()
874 this->computeEmptyMetrics(); in setState()
875 this->resetShifts(); in setState()
895 // In the first case SkParagraph takes the metrics from the default paragraph style in computeEmptyMetrics()
896 // In the second case it should take it from the current text style in computeEmptyMetrics()
903 auto typefaces = fontCollection()->findTypefaces( in computeEmptyMetrics()
918 fEmptyMetrics.leading() + strutHeight - intrinsicHeight); in computeEmptyMetrics()
930 …// In case of non-empty paragraph TextHeightBehaviour flags will be applied at the appropriate pla… in computeEmptyMetrics()
952 return fUnicode->convertUtf16ToUtf8(fParagraphStyle.getEllipsisUtf16()); in getEllipsis()
1013 --utf8; in findPreviousGraphemeBoundary()
1035 size_t index = ptr - fText.c_str(); in ensureUTF16Mapping()
1039 size_t next = ptr - fText.c_str(); in ensureUTF16Mapping()
1067 const uint32_t* clusterPtr = &R->fClusterIndexes[0]; in visit()
1069 if (R->fClusterStart > 0) { in visit()
1070 int count = R->fClusterIndexes.count(); in visit()
1073 clusterStorage[i] = R->fClusterStart + R->fClusterIndexes[i]; in visit()