26#if defined(SK_TYPEFACE_FACTORY_FONTATIONS)
36namespace ColrV1TestDefinitions {
41const char kColrCpalTestFontPath[] =
"fonts/test_glyphs-glyf_colr_1.ttf";
64 {
static_cast<uint16_t
>(-1), 0xff00ff00},
75 0, kColorOverridesOne,
std::size(kColorOverridesOne)};
77 0, kColorOverridesAll,
std::size(kColorOverridesAll)};
88 : fName(test_name), fPalette(paletteOverride) {}
120 *errorMsg =
"Did not recognize COLR v1 test font format.";
129 SkFont paletteFont(typeface);
161 using INHERITED =
GM;
std::unique_ptr< SkStreamAsset > GetResourceAsStream(const char *resource, bool useFileStream)
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorWHITE
@ kUTF32
uses four byte words to represent all of Unicode
static SkString resource(SkPDFResourceType type, int index)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
void setSize(SkScalar textSize)
SkScalar getMetrics(SkFontMetrics *metrics) const
const char * c_str() const
sk_sp< SkTypeface > makeClone(const SkFontArguments &) const
FontPaletteGM(const char *test_name, const SkFontArguments::Palette &paletteOverride)
void onOnceBeforeDraw() override
SkString getName() const override
SkISize getISize() override
sk_sp< SkTypeface > fTypefaceDefault
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
sk_sp< SkTypeface > fTypefaceCloned
sk_sp< SkTypeface > fTypefaceFromStream
GM(SkColor backgroundColor=SK_ColorWHITE)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
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
const uint32_t color_circles_palette[]
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
SkFontArguments & setPalette(Palette palette)
SkScalar fLeading
distance to add between lines, typically positive or zero
SkScalar fAscent
distance to reserve above baseline, typically negative
SkScalar fDescent
distance to reserve below baseline, typically positive
static constexpr SkISize Make(int32_t w, int32_t h)