#include <test_font_manager.h>
|
| TestFontManager (std::unique_ptr< FontAssetProvider > font_provider, std::vector< std::string > test_font_family_names) |
|
| ~TestFontManager () override |
|
| AssetFontManager (std::unique_ptr< FontAssetProvider > font_provider) |
|
| ~AssetFontManager () override |
|
int | countFamilies () const |
|
void | getFamilyName (int index, SkString *familyName) const |
|
sk_sp< SkFontStyleSet > | createStyleSet (int index) const |
|
sk_sp< SkFontStyleSet > | matchFamily (const char familyName[]) const |
|
sk_sp< SkTypeface > | matchFamilyStyle (const char familyName[], const SkFontStyle &) const |
|
sk_sp< SkTypeface > | matchFamilyStyleCharacter (const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const |
|
sk_sp< SkTypeface > | makeFromData (sk_sp< SkData >, int ttcIndex=0) const |
|
sk_sp< SkTypeface > | makeFromStream (std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const |
|
sk_sp< SkTypeface > | makeFromStream (std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const |
|
sk_sp< SkTypeface > | makeFromFile (const char path[], int ttcIndex=0) const |
|
sk_sp< SkTypeface > | legacyMakeTypeface (const char familyName[], SkFontStyle style) const |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
Definition at line 33 of file test_font_manager.h.
◆ TestFontManager()
txt::TestFontManager::TestFontManager |
( |
std::unique_ptr< FontAssetProvider > |
font_provider, |
|
|
std::vector< std::string > |
test_font_family_names |
|
) |
| |
Definition at line 22 of file test_font_manager.cc.
26 test_font_family_names_(test_font_family_names) {}
AssetFontManager(std::unique_ptr< FontAssetProvider > font_provider)
◆ ~TestFontManager()
txt::TestFontManager::~TestFontManager |
( |
| ) |
|
|
overridedefault |
◆ onMatchFamily()
May return NULL if the name is not found.
Reimplemented from txt::AssetFontManager.
Definition at line 30 of file test_font_manager.cc.
31 {
32
33
34 std::string requested_name(family_name);
35 std::string sanitized_name = test_font_family_names_[0];
36 for (const std::string& test_family : test_font_family_names_) {
37 if (requested_name == test_family) {
38 sanitized_name = test_family;
39 }
40 }
42}
sk_sp< SkFontStyleSet > onMatchFamily(const char familyName[]) const override
The documentation for this class was generated from the following files: