Flutter Engine
Loading...
Searching...
No Matches
test_font_manager.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
6
#define FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
7
8
#include <memory>
9
#include <string>
10
#include <vector>
11
12
#include "
flutter/fml/macros.h
"
13
#include "third_party/skia/include/core/SkFontMgr.h"
14
#include "
txt/asset_font_manager.h
"
15
#include "
txt/font_asset_provider.h
"
16
17
namespace
txt
{
18
19
// A font manager intended for tests that matches all requested fonts using
20
// one family.
21
class
TestFontManager
:
public
AssetFontManager
{
22
public
:
23
TestFontManager
(std::unique_ptr<FontAssetProvider> font_provider,
24
std::vector<std::string> test_font_family_names);
25
26
~TestFontManager
()
override
;
27
28
private
:
29
std::vector<std::string> test_font_family_names_;
30
31
sk_sp<SkFontStyleSet> onMatchFamily(
const
char
family_name[])
const override
;
32
33
FML_DISALLOW_COPY_AND_ASSIGN
(
TestFontManager
);
34
};
35
36
}
// namespace txt
37
38
#endif
// FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
asset_font_manager.h
txt::AssetFontManager
Definition
asset_font_manager.h:19
txt::TestFontManager
Definition
test_font_manager.h:21
txt::TestFontManager::~TestFontManager
~TestFontManager() override
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
font_asset_provider.h
txt
Definition
paragraph_builder_skia.cc:15
txt
src
txt
test_font_manager.h
Generated on Thu Nov 6 2025 16:11:30 for Flutter Engine by
1.9.8