Flutter Engine
The Flutter Engine
Classes | Static Public Member Functions | Protected Member Functions | List of all members
TestEmptyTypeface Class Reference

#include <TestEmptyTypeface.h>

Inheritance diagram for TestEmptyTypeface:
SkTypeface SkWeakRefCnt SkRefCnt SkRefCntBase

Classes

class  EmptyLocalizedStrings
 

Static Public Member Functions

static sk_sp< SkTypefaceMake ()
 
- Static Public Member Functions inherited from SkTypeface
static bool Equal (const SkTypeface *facea, const SkTypeface *faceb)
 
static sk_sp< SkTypefaceMakeEmpty ()
 
static sk_sp< SkTypefaceMakeDeserialize (SkStream *, sk_sp< SkFontMgr > lastResortMgr)
 
static void Register (FactoryId id, sk_sp< SkTypeface >(*make)(std::unique_ptr< SkStreamAsset >, const SkFontArguments &))
 

Protected Member Functions

 TestEmptyTypeface ()
 
std::unique_ptr< SkStreamAssetonOpenStream (int *ttcIndex) const override
 
sk_sp< SkTypefaceonMakeClone (const SkFontArguments &args) const override
 
std::unique_ptr< SkScalerContextonCreateScalerContext (const SkScalerContextEffects &effects, const SkDescriptor *desc) const override
 
void onFilterRec (SkScalerContextRec *) const override
 
std::unique_ptr< SkAdvancedTypefaceMetricsonGetAdvancedMetrics () const override
 
void onGetFontDescriptor (SkFontDescriptor *, bool *) const override
 
void onCharsToGlyphs (const SkUnichar *chars, int count, SkGlyphID glyphs[]) const override
 
int onCountGlyphs () const override
 
void getPostScriptGlyphNames (SkString *) const override
 
void getGlyphToUnicodeMap (SkUnichar *) const override
 
int onGetUPEM () const override
 
void onGetFamilyName (SkString *familyName) const override
 
bool onGetPostScriptName (SkString *) const override
 
SkTypeface::LocalizedStringsonCreateFamilyNameIterator () const override
 
bool onGlyphMaskNeedsCurrentColor () const override
 
int onGetVariationDesignPosition (SkFontArguments::VariationPosition::Coordinate coordinates[], int coordinateCount) const override
 
int onGetVariationDesignParameters (SkFontParameters::Variation::Axis parameters[], int parameterCount) const override
 
int onGetTableTags (SkFontTableTag tags[]) const override
 
size_t onGetTableData (SkFontTableTag, size_t, size_t, void *) const override
 
- Protected Member Functions inherited from SkTypeface
 SkTypeface (const SkFontStyle &style, bool isFixedPitch=false)
 
 ~SkTypeface () override
 
virtual sk_sp< SkTypefaceonMakeClone (const SkFontArguments &) const =0
 
void setIsFixedPitch (bool isFixedPitch)
 
void setFontStyle (SkFontStyle style)
 
virtual std::unique_ptr< SkScalerContextonCreateScalerContext (const SkScalerContextEffects &, const SkDescriptor *) const =0
 
virtual void onFilterRec (SkScalerContextRec *) const =0
 
virtual std::unique_ptr< SkAdvancedTypefaceMetricsonGetAdvancedMetrics () const =0
 
virtual void getPostScriptGlyphNames (SkString *) const =0
 
virtual void getGlyphToUnicodeMap (SkUnichar *dstArray) const =0
 
virtual std::unique_ptr< SkStreamAssetonOpenStream (int *ttcIndex) const =0
 
virtual std::unique_ptr< SkStreamAssetonOpenExistingStream (int *ttcIndex) const
 
virtual bool onGlyphMaskNeedsCurrentColor () const =0
 
virtual int onGetVariationDesignPosition (SkFontArguments::VariationPosition::Coordinate coordinates[], int coordinateCount) const =0
 
virtual int onGetVariationDesignParameters (SkFontParameters::Variation::Axis parameters[], int parameterCount) const =0
 
virtual void onGetFontDescriptor (SkFontDescriptor *, bool *isLocal) const =0
 
virtual void onCharsToGlyphs (const SkUnichar *chars, int count, SkGlyphID glyphs[]) const =0
 
virtual int onCountGlyphs () const =0
 
virtual int onGetUPEM () const =0
 
virtual bool onGetKerningPairAdjustments (const SkGlyphID glyphs[], int count, int32_t adjustments[]) const
 
virtual void onGetFamilyName (SkString *familyName) const =0
 
virtual bool onGetPostScriptName (SkString *) const =0
 
virtual LocalizedStringsonCreateFamilyNameIterator () const =0
 
virtual int onGetTableTags (SkFontTableTag tags[]) const =0
 
virtual size_t onGetTableData (SkFontTableTag, size_t offset, size_t length, void *data) const =0
 
virtual sk_sp< SkDataonCopyTableData (SkFontTableTag) const
 
virtual bool onComputeBounds (SkRect *) const
 
virtual void * onGetCTFontRef () const
 
- Protected Member Functions inherited from SkWeakRefCnt
virtual void weak_dispose () const
 

Additional Inherited Members

- Public Types inherited from SkTypeface
enum class  SerializeBehavior { kDoIncludeData , kDontIncludeData , kIncludeDataIfLocal }
 
using FactoryId = SkFourByteTag
 
- Public Member Functions inherited from SkTypeface
SkFontStyle fontStyle () const
 
bool isBold () const
 
bool isItalic () const
 
bool isFixedPitch () const
 
int getVariationDesignPosition (SkFontArguments::VariationPosition::Coordinate coordinates[], int coordinateCount) const
 
int getVariationDesignParameters (SkFontParameters::Variation::Axis parameters[], int parameterCount) const
 
SkTypefaceID uniqueID () const
 
sk_sp< SkTypefacemakeClone (const SkFontArguments &) const
 
void serialize (SkWStream *, SerializeBehavior=SerializeBehavior::kIncludeDataIfLocal) const
 
sk_sp< SkDataserialize (SerializeBehavior=SerializeBehavior::kIncludeDataIfLocal) const
 
void unicharsToGlyphs (const SkUnichar uni[], int count, SkGlyphID glyphs[]) const
 
int textToGlyphs (const void *text, size_t byteLength, SkTextEncoding encoding, SkGlyphID glyphs[], int maxGlyphCount) const
 
SkGlyphID unicharToGlyph (SkUnichar unichar) const
 
int countGlyphs () const
 
int countTables () const
 
int getTableTags (SkFontTableTag tags[]) const
 
size_t getTableSize (SkFontTableTag) const
 
size_t getTableData (SkFontTableTag tag, size_t offset, size_t length, void *data) const
 
sk_sp< SkDatacopyTableData (SkFontTableTag tag) const
 
int getUnitsPerEm () const
 
bool getKerningPairAdjustments (const SkGlyphID glyphs[], int count, int32_t adjustments[]) const
 
LocalizedStringscreateFamilyNameIterator () const
 
void getFamilyName (SkString *name) const
 
bool getPostScriptName (SkString *name) const
 
std::unique_ptr< SkStreamAssetopenStream (int *ttcIndex) const
 
std::unique_ptr< SkStreamAssetopenExistingStream (int *ttcIndex) const
 
std::unique_ptr< SkScalerContextcreateScalerContext (const SkScalerContextEffects &, const SkDescriptor *) const
 
SkRect getBounds () const
 
void filterRec (SkScalerContextRec *rec) const
 
void getFontDescriptor (SkFontDescriptor *desc, bool *isLocal) const
 
void * internal_private_getCTFontRef () const
 
- Public Member Functions inherited from SkWeakRefCnt
 SkWeakRefCnt ()
 
 ~SkWeakRefCnt () override
 
bool try_ref () const
 
void weak_ref () const
 
void weak_unref () const
 
bool weak_expired () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Definition at line 16 of file TestEmptyTypeface.h.

Constructor & Destructor Documentation

◆ TestEmptyTypeface()

TestEmptyTypeface::TestEmptyTypeface ( )
inlineprotected

Definition at line 21 of file TestEmptyTypeface.h.

21: SkTypeface(SkFontStyle(), true) {}
SkTypeface(const SkFontStyle &style, bool isFixedPitch=false)
Definition: SkTypeface.cpp:56

Member Function Documentation

◆ getGlyphToUnicodeMap()

void TestEmptyTypeface::getGlyphToUnicodeMap ( SkUnichar ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 43 of file TestEmptyTypeface.h.

43{}

◆ getPostScriptGlyphNames()

void TestEmptyTypeface::getPostScriptGlyphNames ( SkString ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 42 of file TestEmptyTypeface.h.

42{}

◆ Make()

static sk_sp< SkTypeface > TestEmptyTypeface::Make ( )
inlinestatic

◆ onCharsToGlyphs()

void TestEmptyTypeface::onCharsToGlyphs ( const SkUnichar chars,
int  count,
SkGlyphID  glyphs[] 
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 38 of file TestEmptyTypeface.h.

38 {
39 sk_bzero(glyphs, count * sizeof(glyphs[0]));
40 }
sk_bzero(glyphs, sizeof(glyphs))
uint16_t glyphs[5]
Definition: FontMgrTest.cpp:46
int count
Definition: FontMgrTest.cpp:50

◆ onCountGlyphs()

int TestEmptyTypeface::onCountGlyphs ( ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 41 of file TestEmptyTypeface.h.

41{ return 0; }

◆ onCreateFamilyNameIterator()

SkTypeface::LocalizedStrings * TestEmptyTypeface::onCreateFamilyNameIterator ( ) const
inlineoverrideprotectedvirtual

Returns an iterator over the family names in the font.

Implements SkTypeface.

Definition at line 51 of file TestEmptyTypeface.h.

51 {
52 return new EmptyLocalizedStrings;
53 }

◆ onCreateScalerContext()

std::unique_ptr< SkScalerContext > TestEmptyTypeface::onCreateScalerContext ( const SkScalerContextEffects effects,
const SkDescriptor desc 
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 27 of file TestEmptyTypeface.h.

29 {
31 sk_ref_sp(const_cast<TestEmptyTypeface*>(this)), effects, desc);
32 }
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381
static std::unique_ptr< SkScalerContext > MakeEmpty(sk_sp< SkTypeface > typeface, const SkScalerContextEffects &effects, const SkDescriptor *desc)

◆ onFilterRec()

void TestEmptyTypeface::onFilterRec ( SkScalerContextRec ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 33 of file TestEmptyTypeface.h.

33{}

◆ onGetAdvancedMetrics()

std::unique_ptr< SkAdvancedTypefaceMetrics > TestEmptyTypeface::onGetAdvancedMetrics ( ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 34 of file TestEmptyTypeface.h.

34 {
35 return nullptr;
36 }

◆ onGetFamilyName()

void TestEmptyTypeface::onGetFamilyName ( SkString familyName) const
inlineoverrideprotectedvirtual

Returns the family name of the typeface as known by its font manager. This name may or may not be produced by the family name iterator.

Implements SkTypeface.

Definition at line 49 of file TestEmptyTypeface.h.

49{ familyName->reset(); }
void reset()
Definition: SkString.cpp:358

◆ onGetFontDescriptor()

void TestEmptyTypeface::onGetFontDescriptor ( SkFontDescriptor ,
bool *   
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 37 of file TestEmptyTypeface.h.

37{}

◆ onGetPostScriptName()

bool TestEmptyTypeface::onGetPostScriptName ( SkString ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 50 of file TestEmptyTypeface.h.

50{ return false; }

◆ onGetTableData()

size_t TestEmptyTypeface::onGetTableData ( SkFontTableTag  ,
size_t  ,
size_t  ,
void *   
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 64 of file TestEmptyTypeface.h.

64{ return 0; }

◆ onGetTableTags()

int TestEmptyTypeface::onGetTableTags ( SkFontTableTag  tags[]) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 63 of file TestEmptyTypeface.h.

63{ return 0; }

◆ onGetUPEM()

int TestEmptyTypeface::onGetUPEM ( ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 44 of file TestEmptyTypeface.h.

44{ return 0; }

◆ onGetVariationDesignParameters()

int TestEmptyTypeface::onGetVariationDesignParameters ( SkFontParameters::Variation::Axis  parameters[],
int  parameterCount 
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 59 of file TestEmptyTypeface.h.

60 {
61 return 0;
62 }

◆ onGetVariationDesignPosition()

int TestEmptyTypeface::onGetVariationDesignPosition ( SkFontArguments::VariationPosition::Coordinate  coordinates[],
int  coordinateCount 
) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 55 of file TestEmptyTypeface.h.

56 {
57 return 0;
58 }

◆ onGlyphMaskNeedsCurrentColor()

bool TestEmptyTypeface::onGlyphMaskNeedsCurrentColor ( ) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 54 of file TestEmptyTypeface.h.

54{ return false; }

◆ onMakeClone()

sk_sp< SkTypeface > TestEmptyTypeface::onMakeClone ( const SkFontArguments args) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 24 of file TestEmptyTypeface.h.

24 {
25 return sk_ref_sp(this);
26 }

◆ onOpenStream()

std::unique_ptr< SkStreamAsset > TestEmptyTypeface::onOpenStream ( int ttcIndex) const
inlineoverrideprotectedvirtual

Implements SkTypeface.

Definition at line 23 of file TestEmptyTypeface.h.

23{ return nullptr; }

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