Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
skparagraph
utils
TestFontCollection.h
Go to the documentation of this file.
1
// Copyright 2019 Google LLC.
2
#include "
modules/skparagraph/include/FontCollection.h
"
3
#include "
modules/skparagraph/include/TypefaceFontProvider.h
"
4
#include "
src/core/SkFontDescriptor.h
"
5
6
#include <string>
7
8
namespace
skia
{
9
namespace
textlayout {
10
class
TestFontCollection
:
public
FontCollection
{
11
public
:
12
// if load is true, will load the fonts (using Freetype, Core Text, or DirectWrite) from
13
// resourceDir.
14
TestFontCollection
(
const
std::string& resourceDir,
bool
testOnly =
false
,
bool
loadFonts =
true
);
15
16
size_t
fontsFound
()
const
{
return
fFontsFound; }
17
bool
addFontFromFile
(
const
std::string& path,
const
std::string& familyName =
""
);
18
19
private
:
20
std::string fResourceDir;
21
size_t
fFontsFound;
22
sk_sp<TypefaceFontProvider>
fFontProvider;
23
std::string fDirs;
24
};
25
}
// namespace textlayout
26
}
// namespace skia
FontCollection.h
SkFontDescriptor.h
TypefaceFontProvider.h
sk_sp
Definition
SkRefCnt.h:220
skia::textlayout::FontCollection
Definition
FontCollection.h:21
skia::textlayout::TestFontCollection
Definition
TestFontCollection.h:10
skia::textlayout::TestFontCollection::addFontFromFile
bool addFontFromFile(const std::string &path, const std::string &familyName="")
Definition
TestFontCollection.cpp:51
skia::textlayout::TestFontCollection::fontsFound
size_t fontsFound() const
Definition
TestFontCollection.h:16
skia
Definition
DartTypes.h:13
Generated on Fri Apr 26 2024 06:16:22 for Flutter Engine by
1.9.8