skia2/modules/skparagraph/utils/TestFontCollection.h
Brian Salomon d007281c9a Fix clang 12 Wsuggest-override and Wsuggest-destructor-override
Change-Id: Ic44e24057b95bb014504f02a736fb4341afc8971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-22 01:11:36 +00:00

23 lines
716 B
C++

// Copyright 2019 Google LLC.
#include "modules/skparagraph/include/FontCollection.h"
#include "modules/skparagraph/include/TypefaceFontProvider.h"
#include "src/core/SkFontDescriptor.h"
namespace skia {
namespace textlayout {
class TestFontCollection : public FontCollection {
public:
TestFontCollection(const std::string& resourceDir, bool testOnly = false, bool loadFonts = true);
size_t fontsFound() const { return fFontsFound; }
bool addFontFromFile(const std::string& path, const std::string& familyName = "");
private:
std::string fResourceDir;
size_t fFontsFound;
sk_sp<TypefaceFontProvider> fFontProvider;
std::string fDirs;
};
} // namespace textlayout
} // namespace skia