1 // Copyright 2021 Google LLC.
2
3 #include "experimental/sktext/src/LogicalRun.h"
4
5 namespace skia {
6 namespace text {
7
LogicalRun(const SkShaper::RunHandler::RunInfo & info,TextIndex textStart,SkScalar glyphOffset)8 LogicalRun::LogicalRun(const SkShaper::RunHandler::RunInfo& info, TextIndex textStart, SkScalar glyphOffset)
9 : fFont(info.fFont)
10 , fTextMetrics(info.fFont)
11 , fRunType(LogicalRunType::kText)
12 , fAdvance(info.fAdvance)
13 , fUtf8Range(info.utf8Range)
14 , fRunStart(textStart)
15 , fRunOffset(glyphOffset)
16 , fBidiLevel(info.fBidiLevel)
17 {
18 fGlyphs.push_back_n(info.glyphCount);
19 fBounds.push_back_n(info.glyphCount);
20 fPositions.push_back_n(info.glyphCount + 1);
21 fOffsets.push_back_n(info.glyphCount);
22 fClusters.push_back_n(info.glyphCount + 1);
23 }
24
25 } // namespace text
26 } // namespace skia
27