Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
OneFontMgr Class Reference
Inheritance diagram for OneFontMgr:
SkFontMgr SkRefCnt SkRefCntBase

Public Member Functions

 OneFontMgr (sk_sp< SkTypeface > face)
 
- Public Member Functions inherited from SkFontMgr
int countFamilies () const
 
void getFamilyName (int index, SkString *familyName) const
 
sk_sp< SkFontStyleSetcreateStyleSet (int index) const
 
sk_sp< SkFontStyleSetmatchFamily (const char familyName[]) const
 
sk_sp< SkTypefacematchFamilyStyle (const char familyName[], const SkFontStyle &) const
 
sk_sp< SkTypefacematchFamilyStyleCharacter (const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const
 
sk_sp< SkTypefacemakeFromData (sk_sp< SkData >, int ttcIndex=0) const
 
sk_sp< SkTypefacemakeFromStream (std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
 
sk_sp< SkTypefacemakeFromStream (std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const
 
sk_sp< SkTypefacemakeFromFile (const char path[], int ttcIndex=0) const
 
sk_sp< SkTypefacelegacyMakeTypeface (const char familyName[], SkFontStyle style) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Protected Member Functions

int onCountFamilies () const override
 
void onGetFamilyName (int index, SkString *familyName) const override
 
sk_sp< SkFontStyleSetonCreateStyleSet (int index) const override
 
sk_sp< SkFontStyleSetonMatchFamily (const char[]) const override
 
sk_sp< SkTypefaceonMatchFamilyStyle (const char[], const SkFontStyle &) const override
 
sk_sp< SkTypefaceonMatchFamilyStyleCharacter (const char familyName[], const SkFontStyle &style, const char *bcp47[], int bcp47Count, SkUnichar character) const override
 
sk_sp< SkTypefaceonLegacyMakeTypeface (const char[], SkFontStyle) const override
 
sk_sp< SkTypefaceonMakeFromData (sk_sp< SkData >, int) const override
 
sk_sp< SkTypefaceonMakeFromStreamIndex (std::unique_ptr< SkStreamAsset >, int) const override
 
sk_sp< SkTypefaceonMakeFromStreamArgs (std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const override
 
sk_sp< SkTypefaceonMakeFromFile (const char[], int) const override
 

Additional Inherited Members

- Static Public Member Functions inherited from SkFontMgr
static sk_sp< SkFontMgrRefEmpty ()
 

Detailed Description

Definition at line 61 of file shape_text.cpp.

Constructor & Destructor Documentation

◆ OneFontMgr()

OneFontMgr::OneFontMgr ( sk_sp< SkTypeface face)
inlineexplicit

Definition at line 63 of file shape_text.cpp.

64 : face_(face), style_set_(sk_make_sp<OneFontStyleSet>(face)) {}

Member Function Documentation

◆ onCountFamilies()

int OneFontMgr::onCountFamilies ( ) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 67 of file shape_text.cpp.

67{ return 1; }

◆ onCreateStyleSet()

sk_sp< SkFontStyleSet > OneFontMgr::onCreateStyleSet ( int  index) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 71 of file shape_text.cpp.

71 {
72 return style_set_;
73 }

◆ onGetFamilyName()

void OneFontMgr::onGetFamilyName ( int  index,
SkString familyName 
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 68 of file shape_text.cpp.

68 {
69 *familyName = SkString("the-only-font-I-have");
70 }

◆ onLegacyMakeTypeface()

sk_sp< SkTypeface > OneFontMgr::onLegacyMakeTypeface ( const char  [],
SkFontStyle   
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 87 of file shape_text.cpp.

88 {
89 return face_;
90 }

◆ onMakeFromData()

sk_sp< SkTypeface > OneFontMgr::onMakeFromData ( sk_sp< SkData ,
int   
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 92 of file shape_text.cpp.

92 {
93 std::abort();
94 return nullptr;
95 }

◆ onMakeFromFile()

sk_sp< SkTypeface > OneFontMgr::onMakeFromFile ( const char  [],
int   
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 106 of file shape_text.cpp.

106 {
107 std::abort();
108 return nullptr;
109 }

◆ onMakeFromStreamArgs()

sk_sp< SkTypeface > OneFontMgr::onMakeFromStreamArgs ( std::unique_ptr< SkStreamAsset ,
const SkFontArguments  
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 101 of file shape_text.cpp.

102 {
103 std::abort();
104 return nullptr;
105 }

◆ onMakeFromStreamIndex()

sk_sp< SkTypeface > OneFontMgr::onMakeFromStreamIndex ( std::unique_ptr< SkStreamAsset ,
int   
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 96 of file shape_text.cpp.

97 {
98 std::abort();
99 return nullptr;
100 }

◆ onMatchFamily()

sk_sp< SkFontStyleSet > OneFontMgr::onMatchFamily ( const char  familyName[]) const
inlineoverrideprotectedvirtual

May return NULL if the name is not found.

Implements SkFontMgr.

Definition at line 74 of file shape_text.cpp.

74 {
75 return style_set_;
76 }

◆ onMatchFamilyStyle()

sk_sp< SkTypeface > OneFontMgr::onMatchFamilyStyle ( const char  [],
const SkFontStyle  
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 78 of file shape_text.cpp.

79 {
80 return face_;
81 }

◆ onMatchFamilyStyleCharacter()

sk_sp< SkTypeface > OneFontMgr::onMatchFamilyStyleCharacter ( const char  familyName[],
const SkFontStyle style,
const char *  bcp47[],
int  bcp47Count,
SkUnichar  character 
) const
inlineoverrideprotectedvirtual

Implements SkFontMgr.

Definition at line 82 of file shape_text.cpp.

84 {
85 return face_;
86 }

The documentation for this class was generated from the following file: