 |
Skia
2D Graphics Library
|
Go to the documentation of this file.
8 #ifndef SkFontMgr_DEFINED
9 #define SkFontMgr_DEFINED
87 const char* bcp47[],
int bcp47Count,
138 const char* bcp47[],
int bcp47Count,
145 int ttcIndex)
const = 0;
SkFontStyleSet * matchFamily(const char familyName[]) const
The caller must call unref() on the returned object.
Definition: SkFontStyle.h:14
static sk_sp< SkFontMgr > RefDefault()
Return the default fontmgr.
virtual SkTypeface * matchStyle(const SkFontStyle &pattern)=0
virtual SkTypeface * onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const =0
Definition: SkRefCnt.h:118
sk_sp< SkTypeface > makeFromFile(const char path[], int ttcIndex=0) const
Create a typeface for the specified fileName and TTC index (pass 0 for none) or NULL if the file is n...
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
Create a typeface for the specified stream and TTC index (pass 0 for none) or NULL if the stream is n...
static SkFontStyleSet * CreateEmpty()
virtual SkTypeface * onMatchFamilyStyle(const char familyName[], const SkFontStyle &) const =0
virtual sk_sp< SkTypeface > onMakeFromStreamArgs(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const =0
int countFamilies() const
SkData holds an immutable data buffer.
Definition: SkData.h:22
sk_sp< SkTypeface > makeFromData(sk_sp< SkData >, int ttcIndex=0) const
Create a typeface for the specified data and TTC index (pass 0 for none) or NULL if the data is not r...
Definition: SkTypeface.h:45
virtual void getStyle(int index, SkFontStyle *, SkString *style)=0
#define SK_API
Definition: SkTypes.h:181
virtual sk_sp< SkTypeface > onMakeFromStreamIndex(std::unique_ptr< SkStreamAsset >, int ttcIndex) const =0
virtual SkTypeface * onMatchFaceStyle(const SkTypeface *, const SkFontStyle &) const =0
virtual SkFontStyleSet * onMatchFamily(const char familyName[]) const =0
May return NULL if the name is not found.
sk_sp< SkTypeface > makeFromFontData(std::unique_ptr< SkFontData >) const
Create a typeface from the specified font data.
SkTypeface * matchStyleCSS3(const SkFontStyle &pattern)
sk_sp< SkTypeface > legacyMakeTypeface(const char familyName[], SkFontStyle style) const
Definition: SkFontMgr.h:38
Definition: SkFontMgr.h:22
virtual sk_sp< SkTypeface > onMakeFromFontData(std::unique_ptr< SkFontData >) const
void getFamilyName(int index, SkString *familyName) const
int32_t SkUnichar
32 bit integer to hold a unicode value
Definition: SkTypes.h:552
virtual sk_sp< SkTypeface > onMakeFromData(sk_sp< SkData >, int ttcIndex) const =0
SkStreamAsset is a SkStreamSeekable for which getLength is required.
Definition: SkStream.h:195
SkTypeface * matchFamilyStyleCharacter(const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const
Use the system fallback to find a typeface for the given character.
virtual sk_sp< SkTypeface > onMakeFromFile(const char path[], int ttcIndex) const =0
SkFontStyleSet * createStyleSet(int index) const
virtual int onCountFamilies() const =0
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const
virtual void onGetFamilyName(int index, SkString *familyName) const =0
Definition: SkString.h:116
virtual sk_sp< SkTypeface > onLegacyMakeTypeface(const char familyName[], SkFontStyle) const =0
SkTypeface * matchFamilyStyle(const char familyName[], const SkFontStyle &) const
Find the closest matching typeface to the specified familyName and style and return a ref to it.
Represents a set of actual arguments for a font.
Definition: SkFontArguments.h:15
virtual SkFontStyleSet * onCreateStyleSet(int index) const =0
virtual SkTypeface * createTypeface(int index)=0