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"
16
17namespace txt {
18
19// A font manager intended for tests that matches all requested fonts using
20// one family.
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
34};
35
36} // namespace txt
37
38#endif // FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
~TestFontManager() override
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27