23#if defined(SK_FONTMGR_FONTCONFIG_AVAILABLE)
27#if defined(SK_FONTMGR_CORETEXT_AVAILABLE)
40 printf(
"Cannot open output file %s\n",
argv[1]);
45 metadata.
fTitle =
"Test PDF";
46 metadata.
fAuthor =
"Skia Demo Writer";
47 metadata.
fLang =
"eng";
51 SkCanvas* canvas = pdf->beginPage(100, 50);
53#if defined(SK_FONTMGR_FONTCONFIG_AVAILABLE)
56#if defined(SK_FONTMGR_CORETEXT_AVAILABLE)
62 printf(
"Cannot open typeface\n");
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorGREEN
SK_API sk_sp< SkFontMgr > SkFontMgr_New_FontConfig(FcConfig *fc)
SK_API sk_sp< SkFontMgr > SkFontMgr_New_CoreText(CTFontCollectionRef)
void clear(SkColor color)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
SK_API sk_sp< SkDocument > MakeDocument(SkWStream *stream, const Metadata &metadata)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
font
Font Metadata and Metrics.
int main(int argc, char **argv)