Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SkTypeface_FreeTypeStream Class Reference

#include <SkTypeface_FreeType.h>

Inheritance diagram for SkTypeface_FreeTypeStream:
SkTypeface_FreeType SkTypeface SkWeakRefCnt SkRefCnt SkRefCntBase SkTypeface_Fuchsia

Public Member Functions

 SkTypeface_FreeTypeStream (std::unique_ptr< SkFontData > fontData, const SkString familyName, const SkFontStyle &style, bool isFixedPitch)
 
 ~SkTypeface_FreeTypeStream () override
 
- Public Member Functions inherited from SkTypeface_FreeType
std::unique_ptr< SkFontDatamakeFontData () const
 
FaceRecgetFaceRec () const
 
- 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
 

Protected Member Functions

void onGetFamilyName (SkString *familyName) const override
 
void onGetFontDescriptor (SkFontDescriptor *, bool *serialize) const override
 
std::unique_ptr< SkStreamAssetonOpenStream (int *ttcIndex) const override
 
std::unique_ptr< SkFontDataonMakeFontData () const override
 
sk_sp< SkTypefaceonMakeClone (const SkFontArguments &) const override
 
- Protected Member Functions inherited from SkTypeface_FreeType
 SkTypeface_FreeType (const SkFontStyle &style, bool isFixedPitch)
 
 ~SkTypeface_FreeType () override
 
std::unique_ptr< SkFontDatacloneFontData (const SkFontArguments &, SkFontStyle *style) const
 
std::unique_ptr< SkScalerContextonCreateScalerContext (const SkScalerContextEffects &, const SkDescriptor *) const override
 
void onFilterRec (SkScalerContextRec *) const override
 
void getGlyphToUnicodeMap (SkUnichar *) const override
 
std::unique_ptr< SkAdvancedTypefaceMetricsonGetAdvancedMetrics () const override
 
void getPostScriptGlyphNames (SkString *dstArray) const override
 
bool onGetPostScriptName (SkString *) const override
 
int onGetUPEM () const override
 
bool onGetKerningPairAdjustments (const uint16_t glyphs[], int count, int32_t adjustments[]) const override
 
void onCharsToGlyphs (const SkUnichar uni[], int count, SkGlyphID glyphs[]) const override
 
int onCountGlyphs () const override
 
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
 
void setIsFixedPitch (bool isFixedPitch)
 
void setFontStyle (SkFontStyle style)
 
virtual std::unique_ptr< SkStreamAssetonOpenExistingStream (int *ttcIndex) const
 
virtual void onCharsToGlyphs (const SkUnichar *chars, int count, SkGlyphID glyphs[]) const =0
 
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
 
- Static Public Member Functions inherited from SkTypeface_FreeType
static int GetUnitsPerEm (FT_Face face)
 
static sk_sp< SkTypefaceMakeFromStream (std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
 
- 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 &))
 
- Static Public Attributes inherited from SkTypeface_FreeType
static constexpr SkTypeface::FactoryId FactoryId = SkSetFourByteTag('f','r','e','e')
 
- Static Protected Member Functions inherited from SkTypeface_FreeType
static void FontDataPaletteToDescriptorPalette (const SkFontData &, SkFontDescriptor *)
 

Detailed Description

Definition at line 92 of file SkTypeface_FreeType.h.

Constructor & Destructor Documentation

◆ SkTypeface_FreeTypeStream()

SkTypeface_FreeTypeStream::SkTypeface_FreeTypeStream ( std::unique_ptr< SkFontData fontData,
const SkString  familyName,
const SkFontStyle style,
bool  isFixedPitch 
)

Definition at line 1954 of file SkFontHost_FreeType.cpp.

1958 , fFamilyName(std::move(familyName))
1959 , fData(std::move(fontData))
1960{ }
bool isFixedPitch() const
Definition SkTypeface.h:68

◆ ~SkTypeface_FreeTypeStream()

SkTypeface_FreeTypeStream::~SkTypeface_FreeTypeStream ( )
override

Definition at line 1962 of file SkFontHost_FreeType.cpp.

1962{}

Member Function Documentation

◆ onGetFamilyName()

void SkTypeface_FreeTypeStream::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.

Definition at line 1964 of file SkFontHost_FreeType.cpp.

1964 {
1965 *familyName = fFamilyName;
1966}

◆ onGetFontDescriptor()

void SkTypeface_FreeTypeStream::onGetFontDescriptor ( SkFontDescriptor desc,
bool *  serialize 
) const
overrideprotectedvirtual

Implements SkTypeface.

Definition at line 1991 of file SkFontHost_FreeType.cpp.

1991 {
1992 desc->setFamilyName(fFamilyName.c_str());
1993 desc->setStyle(this->fontStyle());
1996 *serialize = true;
1997}
void setFactoryId(SkTypeface::FactoryId factoryId)
const char * c_str() const
Definition SkString.h:133
static void FontDataPaletteToDescriptorPalette(const SkFontData &, SkFontDescriptor *)
SkFontStyle fontStyle() const
Definition SkTypeface.h:55
void serialize(SkWStream *, SerializeBehavior=SerializeBehavior::kIncludeDataIfLocal) const
SkFourByteTag FactoryId
Definition SkTypeface.h:335

◆ onMakeClone()

sk_sp< SkTypeface > SkTypeface_FreeTypeStream::onMakeClone ( const SkFontArguments args) const
overrideprotectedvirtual

Implements SkTypeface.

Definition at line 1977 of file SkFontHost_FreeType.cpp.

1977 {
1978 SkFontStyle style = this->fontStyle();
1979 std::unique_ptr<SkFontData> data = this->cloneFontData(args, &style);
1980 if (!data) {
1981 return nullptr;
1982 }
1983
1984 SkString familyName;
1985 this->getFamilyName(&familyName);
1986
1987 return sk_make_sp<SkTypeface_FreeTypeStream>(
1988 std::move(data), familyName, style, this->isFixedPitch());
1989}
std::unique_ptr< SkFontData > cloneFontData(const SkFontArguments &, SkFontStyle *style) const
void getFamilyName(SkString *name) const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switches.h:41

◆ onMakeFontData()

std::unique_ptr< SkFontData > SkTypeface_FreeTypeStream::onMakeFontData ( ) const
overrideprotectedvirtual

Implements SkTypeface_FreeType.

Definition at line 1973 of file SkFontHost_FreeType.cpp.

1973 {
1974 return std::make_unique<SkFontData>(*fData);
1975}

◆ onOpenStream()

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

Implements SkTypeface.

Definition at line 1968 of file SkFontHost_FreeType.cpp.

1968 {
1969 *ttcIndex = fData->getIndex();
1970 return fData->getStream()->duplicate();
1971}

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