|
| SkFontMgr_Fuchsia (fuchsia::fonts::ProviderSyncPtr provider) |
|
| ~SkFontMgr_Fuchsia () 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 |
|
|
int | onCountFamilies () const override |
|
void | onGetFamilyName (int index, SkString *familyName) const override |
|
sk_sp< SkFontStyleSet > | onMatchFamily (const char familyName[]) const override |
|
sk_sp< SkFontStyleSet > | onCreateStyleSet (int index) const override |
|
sk_sp< SkTypeface > | onMatchFamilyStyle (const char familyName[], const SkFontStyle &) const override |
|
sk_sp< SkTypeface > | onMatchFamilyStyleCharacter (const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const override |
|
sk_sp< SkTypeface > | onMakeFromData (sk_sp< SkData >, int ttcIndex) const override |
|
sk_sp< SkTypeface > | onMakeFromStreamIndex (std::unique_ptr< SkStreamAsset >, int ttcIndex) const override |
|
sk_sp< SkTypeface > | onMakeFromStreamArgs (std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const override |
|
sk_sp< SkTypeface > | onMakeFromFile (const char path[], int ttcIndex) const override |
|
sk_sp< SkTypeface > | onLegacyMakeTypeface (const char familyName[], SkFontStyle) const override |
|
Definition at line 281 of file SkFontMgr_fuchsia.cpp.
◆ SkFontMgr_Fuchsia()
SkFontMgr_Fuchsia::SkFontMgr_Fuchsia |
( |
fuchsia::fonts::ProviderSyncPtr |
provider | ) |
|
Definition at line 365 of file SkFontMgr_fuchsia.cpp.
366 : fFontProvider(std::move(provider)), fBufferCache(sk_make_sp<SkFuchsiaFontDataCache>()) {}
◆ ~SkFontMgr_Fuchsia()
SkFontMgr_Fuchsia::~SkFontMgr_Fuchsia |
( |
| ) |
|
|
overridedefault |
◆ onCountFamilies()
int SkFontMgr_Fuchsia::onCountFamilies |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ onCreateStyleSet()
◆ onGetFamilyName()
void SkFontMgr_Fuchsia::onGetFamilyName |
( |
int |
index, |
|
|
SkString * |
familyName |
|
) |
| const |
|
overrideprotectedvirtual |
◆ onLegacyMakeTypeface()
Implements SkFontMgr.
Definition at line 436 of file SkFontMgr_fuchsia.cpp.
437 {
439}
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
◆ onMakeFromData()
Implements SkFontMgr.
Definition at line 418 of file SkFontMgr_fuchsia.cpp.
418 {
419 return makeFromStream(std::make_unique<SkMemoryStream>(std::move(data)), ttcIndex);
420}
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
◆ onMakeFromFile()
sk_sp< SkTypeface > SkFontMgr_Fuchsia::onMakeFromFile |
( |
const char |
path[], |
|
|
int |
ttcIndex |
|
) |
| const |
|
overrideprotectedvirtual |
◆ onMakeFromStreamArgs()
Implements SkFontMgr.
Definition at line 427 of file SkFontMgr_fuchsia.cpp.
428 {
430}
struct TypefaceId kNullTypefaceId
sk_sp< SkTypeface > CreateTypefaceFromSkStream(std::unique_ptr< SkStreamAsset > stream, const SkFontArguments &args, TypefaceId id)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
◆ onMakeFromStreamIndex()
◆ onMatchFamily()
May return NULL if the name is not found.
Implements SkFontMgr.
Definition at line 385 of file SkFontMgr_fuchsia.cpp.
385 {
386 fuchsia::fonts::FamilyName typedFamilyName;
387 typedFamilyName.name = familyName;
388
389 fuchsia::fonts::FontFamilyInfo familyInfo;
390 int result = fFontProvider->GetFontFamilyInfo(typedFamilyName, &familyInfo);
391 if (
result != ZX_OK || !familyInfo.has_styles() || familyInfo.styles().empty())
return nullptr;
392
393 std::vector<SkFontStyle> styles;
394 for (auto& style : familyInfo.styles()) {
397 }
398
401}
SkFontStyle::Slant FuchsiaToSkSlant(fuchsia::fonts::Slant slant)
SkFontStyle::Width FuchsiaToSkWidth(fuchsia::fonts::Width width)
sk_sp< T > sk_ref_sp(T *obj)
friend class SkFontStyleSet_Fuchsia
◆ onMatchFamilyStyle()
◆ onMatchFamilyStyleCharacter()
◆ SkFontStyleSet_Fuchsia
The documentation for this class was generated from the following file: