2019-06-19 17:32:01 +00:00
|
|
|
// Copyright 2019 Google LLC.
|
|
|
|
#include "modules/skparagraph/include/FontCollection.h"
|
2019-06-21 16:22:32 +00:00
|
|
|
#include "modules/skparagraph/include/TypefaceFontProvider.h"
|
2019-06-19 17:32:01 +00:00
|
|
|
|
|
|
|
namespace skia {
|
|
|
|
namespace textlayout {
|
|
|
|
class TestFontCollection : public FontCollection {
|
|
|
|
public:
|
|
|
|
TestFontCollection(const std::string& resourceDir);
|
|
|
|
~TestFontCollection() = default;
|
|
|
|
|
|
|
|
size_t fontsFound() const { return fFontsFound; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string fResourceDir;
|
|
|
|
size_t fFontsFound;
|
2019-06-21 16:22:32 +00:00
|
|
|
sk_sp<TypefaceFontProvider> fFontProvider;
|
|
|
|
std::string fDirs;
|
2019-06-19 17:32:01 +00:00
|
|
|
};
|
|
|
|
} // namespace textlayout
|
2019-06-21 16:22:32 +00:00
|
|
|
} // namespace skia
|