129 {
132
133 if (!fTestTypeface) {
134 *errorMsg = "Unable to initialize typeface.";
136 }
137
139 const char32_t testText[] =
U"abc";
143
144 for (
SkScalar textSize : kTextSizes) {
145 font.setSize(textSize);
146 y +=
font.getSpacing();
147
148
152
155 }
156
158 dumpGlyphCount(canvas, fTestTypeface, fReportTypeface);
159 canvas->
translate(0, kDumpFontSize * 1.2);
160 dumpLocalizedStrings(canvas, fTestTypeface, fReportTypeface);
161 canvas->
translate(0, kDumpFontSize * 1.2);
162 dumpFamilyAndPostscriptName(canvas, fTestTypeface, fReportTypeface);
163
165 }
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
@ kUTF32
uses four byte words to represent all of Unicode
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 translate(SkScalar dx, SkScalar dy)
font
Font Metadata and Metrics.
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)