Flutter Engine
The Flutter Engine
third_party
skia
include
ports
SkFontMgr_android.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 Google Inc.
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
#ifndef SkFontMgr_android_DEFINED
9
#define SkFontMgr_android_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
13
class
SkFontMgr
;
14
class
SkFontScanner
;
15
16
struct
SkFontMgr_Android_CustomFonts
{
17
/** When specifying custom fonts, indicates how to use system fonts. */
18
enum
SystemFontUse
{
19
kOnlyCustom
,
/** Use only custom fonts. NDK compliant. */
20
kPreferCustom
,
/** Use custom fonts before system fonts. */
21
kPreferSystem
/** Use system fonts before custom fonts. */
22
};
23
/** Whether or not to use system fonts. */
24
SystemFontUse
fSystemFontUse
;
25
26
/** Base path to resolve relative font file names. If a directory, should end with '/'. */
27
const
char
*
fBasePath
;
28
29
/** Optional custom configuration file to use. */
30
const
char
*
fFontsXml
;
31
32
/** Optional custom configuration file for fonts which provide fallback.
33
* In the new style (version > 21) fontsXml format is used, this should be NULL.
34
*/
35
const
char
*
fFallbackFontsXml
;
36
37
/** Optional custom flag. If set to true the SkFontMgr will acquire all requisite
38
* system IO resources on initialization.
39
*/
40
bool
fIsolated
;
41
};
42
43
/** Create a font manager for Android. If 'custom' is NULL, use only system fonts. */
44
45
// Deprecated
46
SK_API
sk_sp<SkFontMgr>
SkFontMgr_New_Android
(
const
SkFontMgr_Android_CustomFonts
* custom);
47
48
SK_API
sk_sp<SkFontMgr>
SkFontMgr_New_Android
(
const
SkFontMgr_Android_CustomFonts
* custom,
49
std::unique_ptr<SkFontScanner> scanner);
50
#endif
// SkFontMgr_android_DEFINED
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkFontMgr_New_Android
SK_API sk_sp< SkFontMgr > SkFontMgr_New_Android(const SkFontMgr_Android_CustomFonts *custom)
Definition:
SkFontMgr_android.cpp:510
SkRefCnt.h
SkFontMgr
Definition:
SkFontMgr.h:36
SkFontScanner
Definition:
SkFontScanner.h:20
sk_sp< SkFontMgr >
SkFontMgr_Android_CustomFonts
Definition:
SkFontMgr_android.h:16
SkFontMgr_Android_CustomFonts::SystemFontUse
SystemFontUse
Definition:
SkFontMgr_android.h:18
SkFontMgr_Android_CustomFonts::kPreferSystem
@ kPreferSystem
Definition:
SkFontMgr_android.h:21
SkFontMgr_Android_CustomFonts::kOnlyCustom
@ kOnlyCustom
Definition:
SkFontMgr_android.h:19
SkFontMgr_Android_CustomFonts::kPreferCustom
@ kPreferCustom
Definition:
SkFontMgr_android.h:20
SkFontMgr_Android_CustomFonts::fIsolated
bool fIsolated
Definition:
SkFontMgr_android.h:40
SkFontMgr_Android_CustomFonts::fBasePath
const char * fBasePath
Definition:
SkFontMgr_android.h:27
SkFontMgr_Android_CustomFonts::fFallbackFontsXml
const char * fFallbackFontsXml
Definition:
SkFontMgr_android.h:35
SkFontMgr_Android_CustomFonts::fFontsXml
const char * fFontsXml
Definition:
SkFontMgr_android.h:30
SkFontMgr_Android_CustomFonts::fSystemFontUse
SystemFontUse fSystemFontUse
Definition:
SkFontMgr_android.h:24
Generated on Sun Jun 23 2024 21:56:03 for Flutter Engine by
1.9.4