Flutter Engine
 
Loading...
Searching...
No Matches
txt::AssetFontManager Class Reference

#include <asset_font_manager.h>

Inheritance diagram for txt::AssetFontManager:
txt::DynamicFontManager txt::TestFontManager

Public Member Functions

 AssetFontManager (std::unique_ptr< FontAssetProvider > font_provider)
 
 ~AssetFontManager () override
 

Protected Member Functions

sk_sp< SkFontStyleSet > onMatchFamily (const char familyName[]) const override
 

Protected Attributes

std::unique_ptr< FontAssetProviderfont_provider_
 

Detailed Description

Definition at line 19 of file asset_font_manager.h.

Constructor & Destructor Documentation

◆ AssetFontManager()

txt::AssetFontManager::AssetFontManager ( std::unique_ptr< FontAssetProvider font_provider)
explicit

Definition at line 15 of file asset_font_manager.cc.

17 : font_provider_(std::move(font_provider)) {
18 FML_DCHECK(font_provider_ != nullptr);
19}
std::unique_ptr< FontAssetProvider > font_provider_
#define FML_DCHECK(condition)
Definition logging.h:122

References FML_DCHECK, and font_provider_.

◆ ~AssetFontManager()

txt::AssetFontManager::~AssetFontManager ( )
overridedefault

Member Function Documentation

◆ onMatchFamily()

sk_sp< SkFontStyleSet > txt::AssetFontManager::onMatchFamily ( const char  familyName[]) const
overrideprotected

Definition at line 36 of file asset_font_manager.cc.

37 {
38 std::string family_name(family_name_string);
39 return font_provider_->MatchFamily(family_name);
40}

References font_provider_.

Member Data Documentation

◆ font_provider_

std::unique_ptr<FontAssetProvider> txt::AssetFontManager::font_provider_
protected

Definition at line 29 of file asset_font_manager.h.

Referenced by AssetFontManager(), and onMatchFamily().


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