Flutter Engine
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

SkFontStyleSet * onMatchFamily (const char familyName[]) const override
 

Protected Attributes

std::unique_ptr< FontAssetProviderfont_provider_
 

Detailed Description

Definition at line 30 of file asset_font_manager.h.

Constructor & Destructor Documentation

◆ AssetFontManager()

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

Definition at line 27 of file asset_font_manager.cc.

References FML_DCHECK, font_provider_, and ~AssetFontManager().

29  : font_provider_(std::move(font_provider)) {
30  FML_DCHECK(font_provider_ != nullptr);
31 }
#define FML_DCHECK(condition)
Definition: logging.h:86
std::unique_ptr< FontAssetProvider > font_provider_

◆ ~AssetFontManager()

txt::AssetFontManager::~AssetFontManager ( )
overridedefault

Referenced by AssetFontManager().

Member Function Documentation

◆ onMatchFamily()

SkFontStyleSet * txt::AssetFontManager::onMatchFamily ( const char  familyName[]) const
overrideprotected

Definition at line 48 of file asset_font_manager.cc.

References FML_DCHECK, font_provider_, and flutter::path.

Referenced by txt::TestFontManager::TestFontManager().

49  {
50  std::string family_name(family_name_string);
51  return font_provider_->MatchFamily(family_name);
52 }
std::unique_ptr< FontAssetProvider > font_provider_

Member Data Documentation

◆ font_provider_

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

Definition at line 40 of file asset_font_manager.h.

Referenced by AssetFontManager(), and onMatchFamily().


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