26#include <initializer_list>
58 *errorMsg =
SkStringPrintf(
"Unable to instantiate emoji test font of format %s.",
76 for (
SkScalar textSize : {70, 180, 270, 340}) {
77 font.setSize(textSize);
78 font.getMetrics(&metrics);
109 *errorMsg =
SkStringPrintf(
"Unable to instantiate emoji test font of format %s.",
125 for (
SkScalar textSize : {70, 180, 270, 340}) {
126 font.setSize(textSize);
127 font.getMetrics(&metrics);
148 using INHERITED =
GM;
164 const char* ch_end = ch_ptr + strlen(ch_ptr);
165 while (ch_ptr < ch_end &&
count < 2) {
182 *errorMsg =
SkStringPrintf(
"Unable to instantiate emoji test font of format %s.",
199 font.getMetrics(&metrics);
200 for (
auto rotate : {0.0, 45.0, 90.0, 135.0, 180.0, 225.0, 270.0, 315.0}) {
207 canvas->
concat(perspective);
209 for (
int i = 0;
i < 5;
i++) {
226 using INHERITED =
GM;
constexpr SkColor SK_ColorGRAY
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
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)
void concat(const SkMatrix &matrix)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
@ kAlias
no transparent pixels on glyph edges
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & postRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & postConcat(const SkMatrix &other)
SkMatrix & setPerspY(SkScalar v)
void appendUnichar(SkUnichar uni)
const char * c_str() const
GM(SkColor backgroundColor=SK_ColorWHITE)
SkString getName() const override
SkISize getISize() override
ScaledEmojiGM(ToolUtils::EmojiFontFormat format)
void onOnceBeforeDraw() override
ToolUtils::EmojiTestSample fEmojiFont
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
SkString fStripSpacesSampleText
void onOnceBeforeDraw() override
SkString getName() const override
ToolUtils::EmojiTestSample fEmojiFont
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
ScaledEmojiPerspectiveGM(ToolUtils::EmojiFontFormat format)
SkISize getISize() override
ToolUtils::EmojiTestSample fEmojiFont
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
ScaledEmojiPosGM(ToolUtils::EmojiFontFormat format)
SkString getName() const override
SkISize getISize() override
void onOnceBeforeDraw() override
uint32_t uint32_t * format
SK_SPI SkUnichar NextUTF8(const char **ptr, const char *end)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
font
Font Metadata and Metrics.
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static sk_sp< SkTextBlob > make_hpos_test_blob_utf8(const char *text, const SkFont &font)
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)