Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkFontMgr_fontations_empty.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2024 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
10
12void SkFontMgr_Fontations_Empty::onGetFamilyName(int index, SkString* familyName) const {}
13
21 const char familyName[], const SkFontStyle& fontStyle) const {
22 return nullptr;
23}
25 const char familyName[],
26 const SkFontStyle&,
27 const char* bcp47[],
28 int bcp47Count,
29 SkUnichar character) const {
30 return nullptr;
31}
32
34 int ttcIndex) const {
35 return this->makeFromStream(std::make_unique<SkMemoryStream>(std::move(data)), ttcIndex);
36}
37
39 std::unique_ptr<SkStreamAsset> stream, int ttcIndex) const {
40 return this->makeFromStream(std::move(stream), SkFontArguments().setCollectionIndex(ttcIndex));
41}
42
44 std::unique_ptr<SkStreamAsset> stream, const SkFontArguments& args) const {
45 return SkTypeface_Fontations::MakeFromStream(std::move(stream), args);
46}
47
49 int ttcIndex) const {
50 std::unique_ptr<SkStreamAsset> stream = SkStream::MakeFromFile(path);
51 return stream ? this->makeFromStream(std::move(stream), ttcIndex) : nullptr;
52}
53
55 SkFontStyle style) const {
56 return nullptr;
57}
58
60 return sk_make_sp<SkFontMgr_Fontations_Empty>();
61}
sk_sp< SkFontMgr > SkFontMgr_New_Fontations_Empty()
int32_t SkUnichar
Definition SkTypes.h:175
sk_sp< SkTypeface > onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const override
sk_sp< SkTypeface > onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const override
sk_sp< SkFontStyleSet > onMatchFamily(const char familyName[]) const override
sk_sp< SkTypeface > onMakeFromStreamIndex(std::unique_ptr< SkStreamAsset >, int ttcIndex) const override
sk_sp< SkFontStyleSet > onCreateStyleSet(int index) const override
sk_sp< SkTypeface > onMakeFromStreamArgs(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const override
sk_sp< SkTypeface > onMakeFromData(sk_sp< SkData > data, int ttcIndex) const override
sk_sp< SkTypeface > onMakeFromFile(const char path[], int ttcIndex) const override
sk_sp< SkTypeface > onMatchFamilyStyle(const char familyName[], const SkFontStyle &fontStyle) const override
void onGetFamilyName(int index, SkString *familyName) const override
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
static sk_sp< SkFontStyleSet > CreateEmpty()
Definition SkFontMgr.cpp:35
static std::unique_ptr< SkStreamAsset > MakeFromFile(const char path[])
Definition SkStream.cpp:922
static sk_sp< SkTypeface > MakeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args