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

#include <SkTypeface_win_dw.h>

Inheritance diagram for DWriteFontTypeface:
SkTypeface SkWeakRefCnt SkRefCnt SkRefCntBase

Classes

struct  Loaders
 

Public Member Functions

 ~DWriteFontTypeface () override
 
- 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
 

Static Public Member Functions

static sk_sp< SkTypeface > SK_SPI MakeFromStream (std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
 
static SkFontStyle GetStyle (IDWriteFont *font, IDWriteFontFace *fontFace)
 
static sk_sp< DWriteFontTypefaceMake (IDWriteFactory *factory, IDWriteFontFace *fontFace, IDWriteFont *font, IDWriteFontFamily *fontFamily, sk_sp< Loaders > loaders, const SkFontArguments::Palette &palette)
 
- 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 &))
 

Public Attributes

SkTScopedComPtr< IDWriteFactory > fFactory
 
SkTScopedComPtr< IDWriteFactory2 > fFactory2
 
SkTScopedComPtr< IDWriteFontFamily > fDWriteFontFamily
 
SkTScopedComPtr< IDWriteFont > fDWriteFont
 
SkTScopedComPtr< IDWriteFontFace > fDWriteFontFace
 
SkTScopedComPtr< IDWriteFontFace1 > fDWriteFontFace1
 
SkTScopedComPtr< IDWriteFontFace2 > fDWriteFontFace2
 
SkTScopedComPtr< IDWriteFontFace4 > fDWriteFontFace4
 
IDWriteFontFace7 * fDWriteFontFace7 = nullptr
 
bool fIsColorFont
 
std::unique_ptr< SkFontArguments::Palette::OverridefRequestedPaletteEntryOverrides
 
SkFontArguments::Palette fRequestedPalette
 
size_t fPaletteEntryCount
 
std::unique_ptr< SkColor[]> fPalette
 
std::unique_ptr< DWRITE_COLOR_F[]> fDWPalette
 

Static Public Attributes

static constexpr SkTypeface::FactoryId FactoryId = SkSetFourByteTag('d','w','r','t')
 

Protected Member Functions

void weak_dispose () const override
 
sk_sp< SkTypefaceonMakeClone (const SkFontArguments &) const override
 
std::unique_ptr< SkStreamAssetonOpenStream (int *ttcIndex) const override
 
std::unique_ptr< SkScalerContextonCreateScalerContext (const SkScalerContextEffects &, const SkDescriptor *) const override
 
void onFilterRec (SkScalerContextRec *) const override
 
void getGlyphToUnicodeMap (SkUnichar *glyphToUnicode) 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
 
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 offset, size_t length, void *data) const override
 
sk_sp< SkDataonCopyTableData (SkFontTableTag) 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
 
virtual void weak_dispose () const
 

Additional Inherited Members

- Public Types inherited from SkTypeface
enum class  SerializeBehavior { kDoIncludeData , kDontIncludeData , kIncludeDataIfLocal }
 
using FactoryId = SkFourByteTag
 

Detailed Description

Definition at line 38 of file SkTypeface_win_dw.h.

Constructor & Destructor Documentation

◆ ~DWriteFontTypeface()

DWriteFontTypeface::~DWriteFontTypeface ( )
override

Member Function Documentation

◆ getGlyphToUnicodeMap()

void DWriteFontTypeface::getGlyphToUnicodeMap ( SkUnichar glyphToUnicode) const
overrideprotectedvirtual

Implements SkTypeface.

◆ getPostScriptGlyphNames()

void DWriteFontTypeface::getPostScriptGlyphNames ( SkString ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ GetStyle()

static SkFontStyle DWriteFontTypeface::GetStyle ( IDWriteFont *  font,
IDWriteFontFace *  fontFace 
)
static

◆ Make()

static sk_sp< DWriteFontTypeface > DWriteFontTypeface::Make ( IDWriteFactory *  factory,
IDWriteFontFace *  fontFace,
IDWriteFont *  font,
IDWriteFontFamily *  fontFamily,
sk_sp< Loaders loaders,
const SkFontArguments::Palette palette 
)
static

◆ MakeFromStream()

static sk_sp< SkTypeface > SK_SPI DWriteFontTypeface::MakeFromStream ( std::unique_ptr< SkStreamAsset ,
const SkFontArguments  
)
static

◆ onCharsToGlyphs()

void DWriteFontTypeface::onCharsToGlyphs ( const SkUnichar chars,
int  count,
SkGlyphID  glyphs[] 
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onCopyTableData()

sk_sp< SkData > DWriteFontTypeface::onCopyTableData ( SkFontTableTag  ) const
overrideprotectedvirtual

Reimplemented from SkTypeface.

◆ onCountGlyphs()

int DWriteFontTypeface::onCountGlyphs ( ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onCreateFamilyNameIterator()

SkTypeface::LocalizedStrings * DWriteFontTypeface::onCreateFamilyNameIterator ( ) const
overrideprotectedvirtual

Returns an iterator over the family names in the font.

Implements SkTypeface.

◆ onCreateScalerContext()

std::unique_ptr< SkScalerContext > DWriteFontTypeface::onCreateScalerContext ( const SkScalerContextEffects ,
const SkDescriptor  
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onFilterRec()

void DWriteFontTypeface::onFilterRec ( SkScalerContextRec ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetAdvancedMetrics()

std::unique_ptr< SkAdvancedTypefaceMetrics > DWriteFontTypeface::onGetAdvancedMetrics ( ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetFamilyName()

void DWriteFontTypeface::onGetFamilyName ( SkString familyName) const
overrideprotectedvirtual

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.

◆ onGetFontDescriptor()

void DWriteFontTypeface::onGetFontDescriptor ( SkFontDescriptor ,
bool *   
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetPostScriptName()

bool DWriteFontTypeface::onGetPostScriptName ( SkString ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetTableData()

size_t DWriteFontTypeface::onGetTableData ( SkFontTableTag  ,
size_t  offset,
size_t  length,
void *  data 
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetTableTags()

int DWriteFontTypeface::onGetTableTags ( SkFontTableTag  tags[]) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetUPEM()

int DWriteFontTypeface::onGetUPEM ( ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetVariationDesignParameters()

int DWriteFontTypeface::onGetVariationDesignParameters ( SkFontParameters::Variation::Axis  parameters[],
int  parameterCount 
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGetVariationDesignPosition()

int DWriteFontTypeface::onGetVariationDesignPosition ( SkFontArguments::VariationPosition::Coordinate  coordinates[],
int  coordinateCount 
) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onGlyphMaskNeedsCurrentColor()

bool DWriteFontTypeface::onGlyphMaskNeedsCurrentColor ( ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onMakeClone()

sk_sp< SkTypeface > DWriteFontTypeface::onMakeClone ( const SkFontArguments ) const
overrideprotectedvirtual

Implements SkTypeface.

◆ onOpenStream()

std::unique_ptr< SkStreamAsset > DWriteFontTypeface::onOpenStream ( int ttcIndex) const
overrideprotectedvirtual

Implements SkTypeface.

◆ weak_dispose()

void DWriteFontTypeface::weak_dispose ( ) const
inlineoverrideprotectedvirtual

Called when the strong reference count goes to zero. This allows the object to free any resources it may be holding. Weak references may still exist and their level of allowed access to the object is defined by the object's class.

Reimplemented from SkWeakRefCnt.

Definition at line 111 of file SkTypeface_win_dw.h.

111 {
112 fLoaders.reset();
113
114 //SkTypefaceCache::Remove(this);
116 }
virtual void weak_dispose() const
Definition: SkWeakRefCnt.h:154

Member Data Documentation

◆ FactoryId

constexpr SkTypeface::FactoryId DWriteFontTypeface::FactoryId = SkSetFourByteTag('d','w','r','t')
staticconstexpr

Definition at line 59 of file SkTypeface_win_dw.h.

◆ fDWPalette

std::unique_ptr<DWRITE_COLOR_F[]> DWriteFontTypeface::fDWPalette

Definition at line 99 of file SkTypeface_win_dw.h.

◆ fDWriteFont

SkTScopedComPtr<IDWriteFont> DWriteFontTypeface::fDWriteFont

Definition at line 78 of file SkTypeface_win_dw.h.

◆ fDWriteFontFace

SkTScopedComPtr<IDWriteFontFace> DWriteFontTypeface::fDWriteFontFace

Definition at line 79 of file SkTypeface_win_dw.h.

◆ fDWriteFontFace1

SkTScopedComPtr<IDWriteFontFace1> DWriteFontTypeface::fDWriteFontFace1

Definition at line 80 of file SkTypeface_win_dw.h.

◆ fDWriteFontFace2

SkTScopedComPtr<IDWriteFontFace2> DWriteFontTypeface::fDWriteFontFace2

Definition at line 81 of file SkTypeface_win_dw.h.

◆ fDWriteFontFace4

SkTScopedComPtr<IDWriteFontFace4> DWriteFontTypeface::fDWriteFontFace4

Definition at line 82 of file SkTypeface_win_dw.h.

◆ fDWriteFontFace7

IDWriteFontFace7* DWriteFontTypeface::fDWriteFontFace7 = nullptr

Definition at line 91 of file SkTypeface_win_dw.h.

◆ fDWriteFontFamily

SkTScopedComPtr<IDWriteFontFamily> DWriteFontTypeface::fDWriteFontFamily

Definition at line 77 of file SkTypeface_win_dw.h.

◆ fFactory

SkTScopedComPtr<IDWriteFactory> DWriteFontTypeface::fFactory

Definition at line 75 of file SkTypeface_win_dw.h.

◆ fFactory2

SkTScopedComPtr<IDWriteFactory2> DWriteFontTypeface::fFactory2

Definition at line 76 of file SkTypeface_win_dw.h.

◆ fIsColorFont

bool DWriteFontTypeface::fIsColorFont

Definition at line 92 of file SkTypeface_win_dw.h.

◆ fPalette

std::unique_ptr<SkColor[]> DWriteFontTypeface::fPalette

Definition at line 98 of file SkTypeface_win_dw.h.

◆ fPaletteEntryCount

size_t DWriteFontTypeface::fPaletteEntryCount

Definition at line 97 of file SkTypeface_win_dw.h.

◆ fRequestedPalette

SkFontArguments::Palette DWriteFontTypeface::fRequestedPalette

Definition at line 95 of file SkTypeface_win_dw.h.

◆ fRequestedPaletteEntryOverrides

std::unique_ptr<SkFontArguments::Palette::Override> DWriteFontTypeface::fRequestedPaletteEntryOverrides

Definition at line 94 of file SkTypeface_win_dw.h.


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