22#if defined(SK_FONTMGR_FONTCONFIG_AVAILABLE)
26#if defined(SK_FONTMGR_CORETEXT_AVAILABLE)
36const char*
svg =
"<svg viewBox=\"0 0 150 40\" xmlns=\"http://www.w3.org/2000/svg\">"
39 "font: 13px sans-serif;"
42 "<text x=\"10\" y=\"30\">VAVAVAVA</text>"
52 printf(
"Cannot open output file %s\n",
argv[1]);
58#if defined(SK_FONTMGR_FONTCONFIG_AVAILABLE)
60#elif defined(SK_FONTMGR_CORETEXT_AVAILABLE)
64 printf(
"No Font Manager configured\n");
76 printf(
"Could not parse compiled-in svg\n");
83 svg_dom->render(
surface->getCanvas());
89 printf(
"PNG encoding failed.\n");
SK_API sk_sp< SkFontMgr > SkFontMgr_New_FontConfig(FcConfig *fc)
SK_API sk_sp< SkFontMgr > SkFontMgr_New_CoreText(CTFontCollectionRef)
sk_sp< SkFontMgr > fontMgr
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
sk_sp< Factory > BestAvailable()
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DlVertices::Builder Builder
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkSize Make(SkScalar w, SkScalar h)
int main(int argc, char **argv)