Flutter Engine
Loading...
Searching...
No Matches
font_collection.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_LIB_UI_TEXT_FONT_COLLECTION_H_
6
#define FLUTTER_LIB_UI_TEXT_FONT_COLLECTION_H_
7
8
#include <memory>
9
#include <vector>
10
11
#include "
flutter/assets/asset_manager.h
"
12
#include "
flutter/fml/macros.h
"
13
#include "
flutter/fml/memory/ref_ptr.h
"
14
#include "
third_party/tonic/typed_data/typed_list.h
"
15
#include "
txt/font_collection.h
"
16
17
namespace
flutter
{
18
19
class
FontCollection
{
20
public
:
21
FontCollection
();
22
23
virtual
~FontCollection
();
24
25
std::shared_ptr<txt::FontCollection>
GetFontCollection
()
const
;
26
27
void
SetupDefaultFontManager
(uint32_t font_initialization_data);
28
29
// Virtual for testing.
30
virtual
void
RegisterFonts
(
31
const
std::shared_ptr<AssetManager>& asset_manager);
32
33
void
RegisterTestFonts
();
34
35
static
void
LoadFontFromList
(Dart_Handle font_data_handle,
36
Dart_Handle
callback
,
37
const
std::string& family_name);
38
39
private
:
40
std::shared_ptr<txt::FontCollection> collection_;
41
sk_sp<txt::DynamicFontManager> dynamic_font_manager_;
42
43
FML_DISALLOW_COPY_AND_ASSIGN
(
FontCollection
);
44
};
45
46
}
// namespace flutter
47
48
#endif
// FLUTTER_LIB_UI_TEXT_FONT_COLLECTION_H_
asset_manager.h
flutter::FontCollection
Definition
font_collection.h:19
flutter::FontCollection::GetFontCollection
std::shared_ptr< txt::FontCollection > GetFontCollection() const
Definition
font_collection.cc:44
flutter::FontCollection::RegisterFonts
virtual void RegisterFonts(const std::shared_ptr< AssetManager > &asset_manager)
Definition
font_collection.cc:69
flutter::FontCollection::FontCollection
FontCollection()
Definition
font_collection.cc:33
flutter::FontCollection::LoadFontFromList
static void LoadFontFromList(Dart_Handle font_data_handle, Dart_Handle callback, const std::string &family_name)
Definition
font_collection.cc:151
flutter::FontCollection::SetupDefaultFontManager
void SetupDefaultFontManager(uint32_t font_initialization_data)
Definition
font_collection.cc:48
flutter::FontCollection::~FontCollection
virtual ~FontCollection()
Definition
font_collection.cc:39
flutter::FontCollection::RegisterTestFonts
void RegisterTestFonts()
Definition
font_collection.cc:131
callback
FlutterDesktopBinaryReply callback
Definition
flutter_windows_view_unittests.cc:52
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter
Definition
asset_manager.cc:10
ref_ptr.h
font_collection.h
typed_list.h
lib
ui
text
font_collection.h
Generated on Thu Nov 6 2025 16:11:30 for Flutter Engine by
1.9.8