320 {
321 constexpr char fontsXmlFilename[] = "fonts/fonts.xml";
324
327 return;
328 }
329
336
338
340
343 SkCanvas canvasStream(bitmapStream);
345
350
353 paint.setAntiAlias(
true);
354 constexpr float kTextSize = 20;
355
356 std::unique_ptr<SkStreamAsset> distortableStream(
358 if (!distortableStream) {
359 return;
360 }
361
364
365 for (
int i = 0;
i < 10; ++
i) {
369 coordinates[] = {{tag, styleValue}};
371 position = {coordinates,
std::size(coordinates)};
372
376 kTextSize);
378
379
381 typeface->makeClone(
SkFontArguments().setVariationDesignPosition(position)), kTextSize);
383
384 constexpr char text[] =
"abc";
385
387 canvasStream.drawString(
text, point.
fX, point.
fY, fontStream,
paint);
388
390 canvasClone.drawString(
text, point.
fX, point.
fY, fontClone,
paint);
391
394 }
395}
static bool bitmap_compare(const SkBitmap &ref, const SkBitmap &test)
std::unique_ptr< SkStreamAsset > GetResourceAsStream(const char *resource, bool useFileStream)
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorWHITE
#define SkDoubleToScalar(x)
static constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d)
void allocN32Pixels(int width, int height, bool isOpaque=false)
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
sk_sp< SkTypeface > legacyMakeTypeface(const char familyName[], SkFontStyle style) const
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
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
static constexpr SkPoint Make(float x, float y)