27#include <initializer_list>
75 const char*
text = sample.sampleText;
78 for (
SkScalar textSize : { 70, 150 }) {
79 font.setSize(textSize);
80 font.getMetrics(&metrics);
82 font.setSubpixel(
true);
87 for (
bool fakeBold : {
false,
true }) {
88 font.setEmbolden(fakeBold);
98 canvas->
drawRect(advanceRect, advancePaint);
109 using INHERITED =
GM;
114DEF_GM(
return new ScaledEmojiRenderingGM;)
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkEnumerate< Iter > SkMakeEnumerate(C &c)
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
@ kAlias
no transparent pixels on glyph edges
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
GM(SkColor backgroundColor=SK_ColorWHITE)
void onDraw(SkCanvas *canvas) override
SkString getName() const override
ToolUtils::EmojiTestSample fontSamples[std::size(formatsToTest)]
static constexpr ToolUtils::EmojiFontFormat formatsToTest[]
SkISize getISize() override
void onOnceBeforeDraw() override
uint32_t uint32_t * format
Optional< SkRect > bounds
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.
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
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)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)