Flutter Engine
The Flutter Engine
|
#include <SkFontConfigInterface.h>
Classes | |
struct | FontIdentity |
Public Types | |
using | INHERITED = SkRefCnt |
Public Member Functions | |
virtual bool | matchFamilyName (const char familyName[], SkFontStyle requested, FontIdentity *outFontIdentifier, SkString *outFamilyName, SkFontStyle *outStyle)=0 |
virtual SkStreamAsset * | openStream (const FontIdentity &)=0 |
virtual sk_sp< SkTypeface > | makeTypeface (const FontIdentity &identity, sk_sp< SkFontMgr > mgr) |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< SkFontConfigInterface > | RefGlobal () |
static void | SetGlobal (sk_sp< SkFontConfigInterface > fc) |
static SkFontConfigInterface * | GetSingletonDirectInterface () |
A simple interface for remotable font management. The global instance can be found with RefGlobal().
Definition at line 24 of file SkFontConfigInterface.h.
Definition at line 109 of file SkFontConfigInterface.h.
|
static |
Return a singleton instance of a direct subclass that calls into libfontconfig. This does not affect the refcnt of the returned instance.
Definition at line 11 of file SkFontConfigInterface_direct_factory.cpp.
|
virtual |
Return an SkTypeface for the given FontIdentity.
The default implementation simply returns a new typeface built using data obtained from openStream() using the provided SkFontMgr, but derived classes may implement more complex caching schemes.
Definition at line 35 of file SkFontConfigInterface.cpp.
|
pure virtual |
Given a familyName and style, find the best match.
If a match is found, return true and set its outFontIdentifier. If outFamilyName is not null, assign the found familyName to it (which may differ from the requested familyName). If outStyle is not null, assign the found style to it (which may differ from the requested style).
If a match is not found, return false, and ignore all out parameters.
Implemented in SkFontConfigInterfaceDirect.
|
pure virtual |
Given a FontRef, open a stream to access its data, or return null if the FontRef's data is not available. The caller is responsible for deleting the stream when it is done accessing the data.
Implemented in SkFontConfigInterfaceDirect.
|
static |
Returns the global SkFontConfigInterface instance. If it is not nullptr, calls ref() on it. The caller must balance this with a call to unref(). The default SkFontConfigInterface is the result of calling GetSingletonDirectInterface.
Definition at line 19 of file SkFontConfigInterface.cpp.
|
static |
Replace the current global instance with the specified one.
Definition at line 28 of file SkFontConfigInterface.cpp.