8 #ifndef SkFontMgr_DEFINED
9 #define SkFontMgr_DEFINED
85 const char* bcp47[],
int bcp47Count,
115 #if !defined(SK_DISABLE_LEGACY_FONTMGR_REFDEFAULT)
135 const char* bcp47[],
int bcp47Count,
140 int ttcIndex)
const = 0;
149 #if !defined(SK_DISABLE_LEGACY_FONTMGR_FACTORY)
int32_t SkUnichar
32 bit integer to hold a unicode value
Definition: SkTypes.h:167
SkData holds an immutable data buffer.
Definition: SkData.h:25
Definition: SkFontMgr.h:36
virtual sk_sp< SkTypeface > onMatchFamilyStyle(const char familyName[], const SkFontStyle &) const =0
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...
virtual sk_sp< SkTypeface > onMakeFromStreamIndex(std::unique_ptr< SkStreamAsset >, int ttcIndex) const =0
virtual sk_sp< SkFontStyleSet > onMatchFamily(const char familyName[]) const =0
May return NULL if the name is not found.
static sk_sp< SkFontMgr > RefDefault()
Return the default fontmgr.
virtual sk_sp< SkFontStyleSet > onCreateStyleSet(int index) const =0
sk_sp< SkFontStyleSet > createStyleSet(int index) const
virtual void onGetFamilyName(int index, SkString *familyName) const =0
void getFamilyName(int index, SkString *familyName) const
virtual sk_sp< SkTypeface > onLegacyMakeTypeface(const char familyName[], SkFontStyle) const =0
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const
sk_sp< SkFontStyleSet > matchFamily(const char familyName[]) const
The caller must call unref() on the returned object.
sk_sp< 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.
virtual sk_sp< SkTypeface > onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const =0
int countFamilies() const
sk_sp< 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.
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...
virtual sk_sp< SkTypeface > onMakeFromData(sk_sp< SkData >, int ttcIndex) const =0
sk_sp< SkTypeface > legacyMakeTypeface(const char familyName[], SkFontStyle style) const
virtual sk_sp< SkTypeface > onMakeFromStreamArgs(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const =0
virtual sk_sp< SkTypeface > onMakeFromFile(const char path[], int ttcIndex) const =0
static sk_sp< SkFontMgr > RefEmpty()
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...
virtual int onCountFamilies() const =0
Definition: SkFontMgr.h:23
static sk_sp< SkFontStyleSet > CreateEmpty()
virtual sk_sp< SkTypeface > createTypeface(int index)=0
sk_sp< SkTypeface > matchStyleCSS3(const SkFontStyle &pattern)
virtual sk_sp< SkTypeface > matchStyle(const SkFontStyle &pattern)=0
virtual void getStyle(int index, SkFontStyle *, SkString *style)=0
Definition: SkFontStyle.h:16
Definition: SkRefCnt.h:119
SkStreamAsset is a SkStreamSeekable for which getLength is required.
Definition: SkStream.h:186
Light weight class for managing strings.
Definition: SkString.h:118
The SkTypeface class specifies the typeface and intrinsic style of a font.
Definition: SkTypeface.h:52
Represents a set of actual arguments for a font.
Definition: SkFontArguments.h:16