Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
ports
SkFontMgr_custom_empty.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2017 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
#include "
include/core/SkRefCnt.h
"
9
#include "
include/ports/SkFontMgr_empty.h
"
10
#include "
src/core/SkFontScanner.h
"
11
#include "
src/ports/SkFontMgr_custom.h
"
12
13
class
EmptyFontLoader
:
public
SkFontMgr_Custom::SystemFontLoader
{
14
public
:
15
EmptyFontLoader
() { }
16
17
void
loadSystemFonts
(
const
SkFontScanner
* scanner,
18
SkFontMgr_Custom::Families
* families)
const override
19
{
20
SkFontStyleSet_Custom
* family =
new
SkFontStyleSet_Custom
(
SkString
());
21
families->
push_back
().
reset
(family);
22
family->
appendTypeface
(sk_make_sp<SkTypeface_Empty>());
23
}
24
25
};
26
27
sk_sp<SkFontMgr>
SkFontMgr_New_Custom_Empty
() {
28
return
sk_make_sp<SkFontMgr_Custom>(
EmptyFontLoader
());
29
}
SkFontMgr_custom.h
SkFontMgr_New_Custom_Empty
sk_sp< SkFontMgr > SkFontMgr_New_Custom_Empty()
Definition
SkFontMgr_custom_empty.cpp:27
SkFontMgr_empty.h
SkFontScanner.h
SkRefCnt.h
EmptyFontLoader
Definition
SkFontMgr_custom_empty.cpp:13
EmptyFontLoader::EmptyFontLoader
EmptyFontLoader()
Definition
SkFontMgr_custom_empty.cpp:15
EmptyFontLoader::loadSystemFonts
void loadSystemFonts(const SkFontScanner *scanner, SkFontMgr_Custom::Families *families) const override
Definition
SkFontMgr_custom_empty.cpp:17
SkFontMgr_Custom::SystemFontLoader
Definition
SkFontMgr_custom.h:113
SkFontScanner
Definition
SkFontScanner.h:20
SkFontStyleSet_Custom
Definition
SkFontMgr_custom.h:84
SkFontStyleSet_Custom::appendTypeface
void appendTypeface(sk_sp< SkTypeface > typeface)
Definition
SkFontMgr_custom.cpp:99
SkString
Definition
SkString.h:118
sk_sp
Definition
SkRefCnt.h:220
sk_sp::reset
void reset(T *ptr=nullptr)
Definition
SkRefCnt.h:310
skia_private::TArray< sk_sp< SkFontStyleSet_Custom > >
skia_private::TArray::push_back
T & push_back()
Definition
SkTArray.h:200
Generated on Fri Apr 26 2024 06:17:25 for Flutter Engine by
1.9.8