41 const char*
text =
"Hamburgefons ooo mmm";
42 const size_t textLen = strlen(
text);
44 for (
int j = 0; j < 2; ++j) {
46 for (
int i = 0;
i < 5; ++
i) {
63 for (
int ps = 6; ps <= 22; ps++) {
66 y +=
font.getMetrics(
nullptr);
70 font.setSubpixel(
true);
71 font.setLinearMetrics(
true);
72 font.setBaselineSnap(
false);
82DEF_GM(
return new FontScalerGM; )
@ kSlight
minimal modification to improve constrast
@ 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 translate(SkScalar dx, SkScalar dy)
void rotate(SkScalar degrees)
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
GM(SkColor backgroundColor=SK_ColorWHITE)
font
Font Metadata and Metrics.
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkISize Make(int32_t w, int32_t h)
void setLTRB(float left, float top, float right, float bottom)