10#if defined(SK_TYPEFACE_FACTORY_FREETYPE)
12#elif defined(SK_TYPEFACE_FACTORY_CORETEXT)
14#elif defined(SK_TYPEFACE_FACTORY_DIRECTWRITE)
25 : fResourceDir(resourceDir)
27 if (fDirs == resourceDir) {
31 fFontProvider = sk_make_sp<TypefaceFontProvider>();
41 fFontsFound = fFontProvider->countFamilies();
54 file_path.
printf(
"%s/%s", fResourceDir.c_str(),
path.c_str());
60#if defined(SK_TYPEFACE_FACTORY_FREETYPE)
63#elif defined(SK_TYPEFACE_FACTORY_CORETEXT)
65#elif defined(SK_TYPEFACE_FACTORY_DIRECTWRITE)
70 if (familyName.empty()) {
71 fFontProvider->registerTypeface(std::move(face));
73 fFontProvider->registerTypeface(std::move(face),
SkString(familyName.c_str()));
static sk_sp< SkTypeface > SK_SPI MakeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
static std::unique_ptr< SkFILEStream > Make(const char path[])
SK_SPI bool next(SkString *name, bool getDir=false)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
static sk_sp< SkTypeface > MakeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
void disableFontFallback()
void setAssetFontManager(sk_sp< SkFontMgr > fontManager)
void setTestFontManager(sk_sp< SkFontMgr > fontManager)
TestFontCollection(const std::string &resourceDir, bool testOnly=false, bool loadFonts=true)
bool addFontFromFile(const std::string &path, const std::string &familyName="")
std::unique_ptr< SkCodec > MakeFromStream(std::unique_ptr< SkStream > stream, SkCodec::SelectionPolicy selectionPolicy, SkCodec::Result *result)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path