10#include "third_party/skia/include/core/SkString.h"
11#include "third_party/skia/include/core/SkTypeface.h"
16 std::unique_ptr<FontAssetProvider> font_provider)
17 : font_provider_(
std::move(font_provider)) {
23int AssetFontManager::onCountFamilies()
const {
27void AssetFontManager::onGetFamilyName(
int index, SkString* familyName)
const {
31sk_sp<SkFontStyleSet> AssetFontManager::onCreateStyleSet(
int index)
const {
37 const char family_name_string[])
const {
38 std::string family_name(family_name_string);
42sk_sp<SkTypeface> AssetFontManager::onMatchFamilyStyle(
43 const char familyName[],
44 const SkFontStyle& style)
const {
45 sk_sp<SkFontStyleSet> font_style_set =
47 if (font_style_set ==
nullptr) {
50 return font_style_set->matchStyle(style);
53sk_sp<SkTypeface> AssetFontManager::onMatchFamilyStyleCharacter(
54 const char familyName[],
62sk_sp<SkTypeface> AssetFontManager::onMakeFromData(sk_sp<SkData>,
68sk_sp<SkTypeface> AssetFontManager::onMakeFromStreamIndex(
69 std::unique_ptr<SkStreamAsset>,
75sk_sp<SkTypeface> AssetFontManager::onMakeFromStreamArgs(
76 std::unique_ptr<SkStreamAsset>,
77 const SkFontArguments&)
const {
82sk_sp<SkTypeface> AssetFontManager::onMakeFromFile(
const char path[],
88sk_sp<SkTypeface> AssetFontManager::onLegacyMakeTypeface(
89 const char familyName[],
~AssetFontManager() override
AssetFontManager(std::unique_ptr< FontAssetProvider > font_provider)
sk_sp< SkFontStyleSet > onMatchFamily(const char familyName[]) const override
std::unique_ptr< FontAssetProvider > font_provider_
#define FML_DCHECK(condition)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path