4 {
10 default: return "";
11 }
12}
13
16 float textScale = 24;
17
22 for (int j = 0; j < styleSet->count(); ++j) {
25 styleSet->getStyle(j, &fontStyle, &style);
27 "SkFont font(fontMgr->legacyMakeTypeface(\"%s\", SkFontStyle(%3d, %1d, %-27s), "
28 "%g);",
32 tostr(fontStyle.
slant()),
33 textScale);
35 y +=
font.getSpacing() * 1.5;
37 }
38 }
39}
40}
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
sk_sp< SkFontStyleSet > createStyleSet(int index) const
void getFamilyName(int index, SkString *familyName) const
int countFamilies() const
sk_sp< SkTypeface > legacyMakeTypeface(const char familyName[], SkFontStyle style) const
const char * c_str() const
sk_sp< SkFontMgr > fontMgr
font
Font Metadata and Metrics.