#include <typeface_font_asset_provider.h>
◆ TypefaceFontAssetProvider()
txt::TypefaceFontAssetProvider::TypefaceFontAssetProvider |
( |
| ) |
|
|
default |
◆ ~TypefaceFontAssetProvider()
txt::TypefaceFontAssetProvider::~TypefaceFontAssetProvider |
( |
| ) |
|
|
overridedefault |
◆ GetFamilyCount()
size_t txt::TypefaceFontAssetProvider::GetFamilyCount |
( |
| ) |
const |
|
overridevirtual |
◆ GetFamilyName()
std::string txt::TypefaceFontAssetProvider::GetFamilyName |
( |
int |
index | ) |
const |
|
overridevirtual |
◆ MatchFamily()
sk_sp< SkFontStyleSet > txt::TypefaceFontAssetProvider::MatchFamily |
( |
const std::string & |
family_name | ) |
|
|
overridevirtual |
◆ RegisterTypeface() [1/2]
void txt::TypefaceFontAssetProvider::RegisterTypeface |
( |
sk_sp< SkTypeface > |
typeface | ) |
|
Definition at line 49 of file typeface_font_asset_provider.cc.
49 {
50 if (typeface == nullptr) {
51 return;
52 }
53
56
57 std::string family_name(sk_family_name.
c_str(), sk_family_name.
size());
59}
const char * c_str() const
void getFamilyName(SkString *name) const
void RegisterTypeface(sk_sp< SkTypeface > typeface)
◆ RegisterTypeface() [2/2]
void txt::TypefaceFontAssetProvider::RegisterTypeface |
( |
sk_sp< SkTypeface > |
typeface, |
|
|
std::string |
family_name_alias |
|
) |
| |
Definition at line 61 of file typeface_font_asset_provider.cc.
63 {
64 if (family_name_alias.empty()) {
65 return;
66 }
67
69 auto family_it = registered_families_.find(canonical_name);
70 if (family_it == registered_families_.end()) {
71 family_names_.push_back(family_name_alias);
73 std::make_pair(canonical_name, sk_make_sp<TypefaceFontStyleSet>());
74 family_it = registered_families_.emplace(
value).first;
75 }
76 family_it->second->registerTypeface(std::move(typeface));
77}
The documentation for this class was generated from the following files: