提交 c2e8a2e3 编写于 作者: J Jason Simmons 提交者: GitHub

Use a generic sans-serif font family on Android that will be recognized by...

Use a generic sans-serif font family on Android that will be recognized by Skia's font manager (#4055)
上级 1c6433fa
......@@ -105,6 +105,8 @@ source_set("txt") {
set_sources_assignment_filter([])
sources += [ "src/txt/platform_mac.mm" ]
set_sources_assignment_filter(sources_assignment_filter)
} else if (is_android) {
sources += [ "src/txt/platform_android.cc" ]
} else {
sources += [ "src/txt/platform.cc" ]
}
......
......@@ -148,8 +148,8 @@ bool Paragraph::AddRunsToLineBreaker(
auto collection = font_collection_->GetMinikinFontCollectionForFamily(
run.style.font_family);
if (collection == nullptr) {
FTL_DLOG(INFO) << "Could not find font collection for family \""
<< run.style.font_family << "\".";
FTL_LOG(INFO) << "Could not find font collection for family \""
<< run.style.font_family << "\".";
return false;
}
breaker_.addStyleRun(&paint, collection, font, run.start, run.end, false,
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "txt/platform.h"
namespace txt {
std::string GetDefaultFontFamily() {
return "sans-serif";
}
} // namespace txt
......@@ -1194,6 +1194,7 @@ FILE: ../../../flutter/third_party/txt/src/txt/directory_asset_data_provider.cc
FILE: ../../../flutter/third_party/txt/src/txt/directory_asset_data_provider.h
FILE: ../../../flutter/third_party/txt/src/txt/platform.cc
FILE: ../../../flutter/third_party/txt/src/txt/platform.h
FILE: ../../../flutter/third_party/txt/src/txt/platform_android.cc
FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.mm
FILE: ../../../flutter/vulkan/vulkan_native_surface_magma.cc
FILE: ../../../flutter/vulkan/vulkan_native_surface_magma.h
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册