42} blobConfigs[][3][3] = {
44 { { 1024, kDefault_Pos, 1 }, { 0, kDefault_Pos, 0 }, { 0, kDefault_Pos, 0 } },
45 { { 1024, kScalar_Pos, 1 }, { 0, kScalar_Pos, 0 }, { 0, kScalar_Pos, 0 } },
46 { { 1024, kPoint_Pos, 1 }, { 0, kPoint_Pos, 0 }, { 0, kPoint_Pos, 0 } },
49 { { 4, kDefault_Pos, 1 }, { 4, kDefault_Pos, 1 }, { 4, kDefault_Pos, 1 } },
50 { { 4, kScalar_Pos, 1 }, { 4, kScalar_Pos, 1 }, { 4, kScalar_Pos, 1 } },
51 { { 4, kPoint_Pos, 1 }, { 4, kPoint_Pos, 1 }, { 4, kPoint_Pos, 1 } },
55 { { 4, kDefault_Pos, 1 }, { 4, kDefault_Pos, 1 }, { 4, kScalar_Pos, 1 } },
56 { { 4, kScalar_Pos, 1 }, { 4, kScalar_Pos, 1 }, { 4, kPoint_Pos, 1 } },
57 { { 4, kPoint_Pos, 1 }, { 4, kPoint_Pos, 1 }, { 4, kDefault_Pos, 1 } },
61 { { 4, kDefault_Pos, 1 }, { 4, kScalar_Pos, 1 }, { 4, kPoint_Pos, 1 } },
62 { { 4, kScalar_Pos, 1 }, { 4, kPoint_Pos, 1 }, { 4, kDefault_Pos, 1 } },
63 { { 4, kPoint_Pos, 1 }, { 4, kDefault_Pos, 1 }, { 4, kScalar_Pos, 1 } },
67 { { 4, kDefault_Pos, .75f }, { 4, kDefault_Pos, 1 }, { 4, kScalar_Pos, 1.25f } },
68 { { 4, kScalar_Pos, .75f }, { 4, kScalar_Pos, 1 }, { 4, kPoint_Pos, 1.25f } },
69 { { 4, kPoint_Pos, .75f }, { 4, kPoint_Pos, 1 }, { 4, kDefault_Pos, 1.25f } },
73 { { 4, kDefault_Pos, 1 }, { 4, kScalar_Pos, .75f }, { 4, kPoint_Pos, 1.25f } },
74 { { 4, kScalar_Pos, 1 }, { 4, kPoint_Pos, .75f }, { 4, kDefault_Pos, 1.25f } },
75 { { 4, kPoint_Pos, 1 }, { 4, kDefault_Pos, .75f }, { 4, kScalar_Pos, 1.25f } },
92 size_t txtLen = strlen(fText);
95 fGlyphs.
append(glyphCount);
108 p.setAntiAlias(
true);
118 p.setAntiAlias(
false);
129 font.setSubpixel(
true);
131 font.setTypeface(fTypeface);
133 for (
unsigned l = 0; l <
std::size(blobConfigs[blobIndex]); ++l) {
134 unsigned currentGlyph = 0;
136 for (
unsigned c = 0; c <
std::size(blobConfigs[blobIndex][l]); ++c) {
137 const BlobCfg* cfg = &blobConfigs[blobIndex][l][c];
138 unsigned count = cfg->count;
140 if (
count > fGlyphs.
size() - currentGlyph) {
158 memcpy(buf.
glyphs, fGlyphs.
begin() + currentGlyph,
count *
sizeof(uint16_t));
164 for (
unsigned i = 0;
i <
count; ++
i) {
168 memcpy(buf.
glyphs, fGlyphs.
begin() + currentGlyph,
count *
sizeof(uint16_t));
175 for (
unsigned i = 0;
i <
count; ++
i) {
180 memcpy(buf.
glyphs, fGlyphs.
begin() + currentGlyph,
count *
sizeof(uint16_t));
187 currentGlyph +=
count;
#define SK_ABORT(message,...)
constexpr SkColor SK_ColorBLUE
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
@ kAntiAlias
may have transparent pixels on glyph edges
@ kStroke_Style
set to stroke geometry
const SkRect & bounds() const
TextBlobGM(const char *txt)
void onOnceBeforeDraw() override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
SkString getName() const override
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
font
Font Metadata and Metrics.
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)
void offset(float dx, float dy)
SkScalar * pos
storage for glyph positions in run
SkGlyphID * glyphs
storage for glyph indexes in run