2e30fde046
Change-Id: Ie6ee30901d599ceefa42651add79bb0288c54c48 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249004 Commit-Queue: Julia Lavrova <jlavrova@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Julia Lavrova <jlavrova@google.com>
23 lines
714 B
C++
23 lines
714 B
C++
// Copyright 2019 Google LLC.
|
|
#include "modules/skparagraph/include/FontCollection.h"
|
|
#include "modules/skparagraph/include/TypefaceFontProvider.h"
|
|
|
|
namespace skia {
|
|
namespace textlayout {
|
|
class TestFontCollection : public FontCollection {
|
|
public:
|
|
TestFontCollection(const std::string& resourceDir, bool testOnly = false, bool loadFonts = true);
|
|
~TestFontCollection() = default;
|
|
|
|
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
|