23 {
28 const size_t txtLen = strlen(
gText);
30
31 fGlyphs.
append(fGlyphCount);
33
34 fPositions.
append(fGlyphCount);
36 auto positions =
SkSpan(fPositions.
begin(), fGlyphCount);
37
38 fLength = positions.back().x() - positions.front().x();
40 fXforms.
append(fGlyphCount);
41
43 const SkScalar lengthToGlyph =
pos.
x() - positions.front().x();
45 const SkScalar cos = std::cos(angle);
46 const SkScalar sin = std::sin(angle);
48 }
49 }
constexpr float SK_FloatPI
@ kUTF8
uses bytes to represent UTF-8 or ASCII
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
constexpr auto SkMakeZip(Ts &&... ts)
void setSubpixel(bool subpixel)
void getPos(const SkGlyphID glyphs[], int count, SkPoint pos[], SkPoint origin={0, 0}) const
void setSize(SkScalar textSize)
int countText(const void *text, size_t byteLength, SkTextEncoding encoding) const
int textToGlyphs(const void *text, size_t byteLength, SkTextEncoding encoding, SkGlyphID glyphs[], int maxGlyphCount) const
static const char gText[]
constexpr float x() const