1 /*
2  * Copyright 2021 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "src/core/SkFontMgrPriv.h"
9 #include "tools/flags/CommandLineFlags.h"
10 #include "tools/flags/CommonFlags.h"
11 #include "tools/fonts/TestFontMgr.h"
12 
13 #if defined(SK_BUILD_FOR_WIN)
14 #include "include/ports/SkTypeface_win.h"
15 #endif
16 SK_API sk_sp<SkFontMgr> SkFontMgr_New_OHOS();
17 
18 namespace CommonFlags {
19 
20 
21 static DEFINE_bool(nativeFonts,
22                    true,
23                    "If true, use native font manager and rendering. "
24                    "If false, fonts will draw as portably as possible.");
25 #if defined(SK_BUILD_FOR_WIN)
26 static DEFINE_bool(gdi, false, "Use GDI instead of DirectWrite for font rendering.");
27 #endif
28 
SetDefaultFontMgr()29 void SetDefaultFontMgr() {
30     gSkFontMgr_DefaultFactory = &SkFontMgr_New_OHOS;
31 }
32 
33 }
34