Flutter Engine
 
Loading...
Searching...
No Matches
font_asset_provider.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_FONT_ASSET_PROVIDER_H_
6#define FLUTTER_TXT_SRC_TXT_FONT_ASSET_PROVIDER_H_
7
8#include <string>
9
10#include "third_party/skia/include/core/SkFontMgr.h"
11
12namespace txt {
13
15 public:
16 virtual ~FontAssetProvider() = default;
17
18 virtual size_t GetFamilyCount() const = 0;
19 virtual std::string GetFamilyName(int index) const = 0;
20 virtual sk_sp<SkFontStyleSet> MatchFamily(const std::string& family_name) = 0;
21
22 protected:
23 static std::string CanonicalFamilyName(std::string family_name);
24};
25
26} // namespace txt
27
28#endif // FLUTTER_TXT_SRC_TXT_FONT_ASSET_PROVIDER_H_
virtual ~FontAssetProvider()=default
static std::string CanonicalFamilyName(std::string family_name)
virtual size_t GetFamilyCount() const =0
virtual sk_sp< SkFontStyleSet > MatchFamily(const std::string &family_name)=0
virtual std::string GetFamilyName(int index) const =0