Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
platform_fuchsia.cc
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#include <lib/zx/channel.h>
6
8#include "txt/platform.h"
9
10#if defined(SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE)
12#endif
13
14namespace txt {
15
16std::vector<std::string> GetDefaultFontFamilies() {
17 return {"Roboto"};
18}
19
20sk_sp<SkFontMgr> GetDefaultFontManager(uint32_t font_initialization_data) {
21 if (font_initialization_data) {
22 fuchsia::fonts::ProviderSyncPtr sync_font_provider;
23 sync_font_provider.Bind(zx::channel(font_initialization_data));
24 return SkFontMgr_New_Fuchsia(std::move(sync_font_provider));
25 } else {
26#if defined(SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE)
28#else
30#endif
31 return mgr;
32 }
33}
34
35} // namespace txt
SK_API sk_sp< SkFontMgr > SkFontMgr_New_Custom_Empty()
SK_API sk_sp< SkFontMgr > SkFontMgr_New_Fuchsia(fuchsia::fonts::ProviderSyncPtr provider)
static sk_sp< SkFontMgr > RefEmpty()
std::vector< std::string > GetDefaultFontFamilies()
Definition platform.cc:13
sk_sp< SkFontMgr > GetDefaultFontManager(uint32_t font_initialization_data)
Definition platform.cc:17