diff options
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r-- | dm/DM.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -39,6 +39,7 @@ #include "SkSpinlock.h" #include "SkTHash.h" #include "SkTaskGroup.h" +#include "SkTypeface_win.h" #include "Test.h" #include "Timer.h" #include "ios_utils.h" @@ -104,6 +105,7 @@ DEFINE_string(dont_write, "", "File extensions to skip writing to --writePath.") DEFINE_bool(nativeFonts, true, "If true, use native font manager and rendering. " "If false, fonts will draw as portably as possible."); +DEFINE_bool(gdi, false, "On Windows, use GDI instead of DirectWrite for font rendering."); using namespace DM; using sk_gpu_test::GrContextFactory; @@ -1323,6 +1325,14 @@ int main(int argc, char** argv) { }; } +#if defined(SK_BUILD_FOR_WIN) + if (FLAGS_gdi) { + gSkFontMgr_DefaultFactory = []() -> sk_sp<SkFontMgr> { + return SkFontMgr_New_GDI(); + }; + } +#endif + initializeEventTracingForTools(); #if !defined(GOOGLE3) && defined(SK_BUILD_FOR_IOS) |