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 namespace skia {
7 namespace textlayout {
8 class TestFontCollection : public FontCollection {
9 public:
10     TestFontCollection(const std::string& resourceDir, bool testOnly = false, bool loadFonts = true);
11 
fontsFound()12     size_t fontsFound() const { return fFontsFound; }
13     bool addFontFromFile(const std::string& path, const std::string& familyName = "");
14 
15 private:
16     std::string fResourceDir;
17     size_t fFontsFound;
18     sk_sp<TypefaceFontProvider> fFontProvider;
19     std::string fDirs;
20 };
21 }  // namespace textlayout
22 }  // namespace skia
23