Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
TestFontCollection.h
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
5
6#include <string>
7
8namespace skia {
9namespace textlayout {
11public:
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
19private:
20 std::string fResourceDir;
21 size_t fFontsFound;
22 sk_sp<TypefaceFontProvider> fFontProvider;
23 std::string fDirs;
24};
25} // namespace textlayout
26} // namespace skia
bool addFontFromFile(const std::string &path, const std::string &familyName="")