Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Static Protected Member Functions | List of all members
txt::FontAssetProvider Class Referenceabstract

#include <font_asset_provider.h>

Inheritance diagram for txt::FontAssetProvider:
flutter::AssetManagerFontProvider txt::TypefaceFontAssetProvider

Public Member Functions

virtual ~FontAssetProvider ()=default
 
virtual size_t GetFamilyCount () const =0
 
virtual std::string GetFamilyName (int index) const =0
 
virtual sk_sp< SkFontStyleSetMatchFamily (const std::string &family_name)=0
 

Static Protected Member Functions

static std::string CanonicalFamilyName (std::string family_name)
 

Detailed Description

Definition at line 26 of file font_asset_provider.h.

Constructor & Destructor Documentation

◆ ~FontAssetProvider()

virtual txt::FontAssetProvider::~FontAssetProvider ( )
virtualdefault

Member Function Documentation

◆ CanonicalFamilyName()

std::string txt::FontAssetProvider::CanonicalFamilyName ( std::string  family_name)
staticprotected

Definition at line 26 of file font_asset_provider.cc.

26 {
27 std::string result(family_name.length(), 0);
28
29 // Convert ASCII characters to lower case.
30 std::transform(family_name.begin(), family_name.end(), result.begin(),
31 [](char c) { return (c & 0x80) ? c : ::tolower(c); });
32
33 return result;
34}
GAsyncResult * result
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition: p3.cpp:47

◆ GetFamilyCount()

virtual size_t txt::FontAssetProvider::GetFamilyCount ( ) const
pure virtual

◆ GetFamilyName()

virtual std::string txt::FontAssetProvider::GetFamilyName ( int  index) const
pure virtual

◆ MatchFamily()

virtual sk_sp< SkFontStyleSet > txt::FontAssetProvider::MatchFamily ( const std::string &  family_name)
pure virtual

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