2025-04-26 10:14:41 +00:00
|
|
|
--- src/skia/BUILD.gn.orig 2025-04-11 12:05:22.085153891 +0200
|
|
|
|
|
+++ src/skia/BUILD.gn 2025-04-11 20:35:59.999827501 +0200
|
|
|
|
|
@@ -8,7 +8,6 @@ import("//build/config/features.gni")
|
2025-01-12 20:37:55 +00:00
|
|
|
import("//build/config/freetype/freetype.gni")
|
|
|
|
|
import("//build/config/rust.gni")
|
|
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
|
|
|
-import("//build/rust/rust_static_library.gni")
|
|
|
|
|
import("//gpu/vulkan/features.gni")
|
2025-04-26 10:14:41 +00:00
|
|
|
import("//skia/skia.gni")
|
|
|
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
|
|
|
@@ -37,27 +36,6 @@ buildflag_header("buildflags") {
|
2025-01-12 20:37:55 +00:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-source_set("path_bridge") {
|
|
|
|
|
- sources = skia_fontations_path_bridge_sources
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-rust_static_library("bridge_rust_side") {
|
|
|
|
|
- allow_unsafe = true
|
|
|
|
|
- crate_root = skia_fontations_bridge_root
|
|
|
|
|
- sources = skia_fontations_bridge_sources
|
|
|
|
|
- cxx_bindings = skia_fontations_bridge_sources
|
|
|
|
|
- deps = [
|
|
|
|
|
- ":path_bridge",
|
2025-04-26 10:14:41 +00:00
|
|
|
- "//third_party/rust/font_types/v0_8:lib",
|
|
|
|
|
- "//third_party/rust/read_fonts/v0_25:lib",
|
|
|
|
|
- "//third_party/rust/skrifa/v0_26:lib",
|
2025-01-12 20:37:55 +00:00
|
|
|
- ]
|
|
|
|
|
- configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
|
- configs += [
|
|
|
|
|
- ":skia_config",
|
|
|
|
|
- "//build/config/compiler:no_chromium_code",
|
|
|
|
|
- ]
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
# External-facing config for dependent code.
|
|
|
|
|
config("skia_config") {
|
2025-04-26 10:14:41 +00:00
|
|
|
@@ -182,7 +160,6 @@ config("skia_library_config") {
|
|
|
|
|
if (use_blink && enable_freetype) {
|
|
|
|
|
defines += [
|
|
|
|
|
"SK_TYPEFACE_FACTORY_FREETYPE",
|
|
|
|
|
- "SK_TYPEFACE_FACTORY_FONTATIONS",
|
|
|
|
|
"SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
@@ -417,14 +394,6 @@ component("skia") {
|
|
|
|
|
public += skia_ports_fontmgr_empty_public
|
|
|
|
|
}
|
|
|
|
|
sources += skia_ports_typeface_proxy_sources
|
2025-01-12 20:37:55 +00:00
|
|
|
- sources += skia_ports_typeface_fontations_sources
|
2025-04-26 10:14:41 +00:00
|
|
|
- sources += skia_ports_fontmgr_fontations_sources
|
|
|
|
|
-
|
2025-01-12 20:37:55 +00:00
|
|
|
- # Fontations Rust/C++ bridge interfaces.
|
|
|
|
|
- deps += [
|
|
|
|
|
- ":bridge_rust_side",
|
|
|
|
|
- ":path_bridge",
|
|
|
|
|
- ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
2025-04-26 10:14:41 +00:00
|
|
|
@@ -719,13 +688,7 @@ skia_source_set("skia_core_and_effects")
|
|
|
|
|
# skia_core_and_effects rather than the other way around.
|
|
|
|
|
public_deps = [ "//third_party/dawn/include/dawn:cpp_headers" ]
|
|
|
|
|
}
|
|
|
|
|
- if (use_blink) {
|
|
|
|
|
- # Fontations Rust/C++ bridge interfaces, needed by SkTypeface.
|
|
|
|
|
- deps += [
|
|
|
|
|
- ":bridge_rust_side",
|
|
|
|
|
- ":path_bridge",
|
|
|
|
|
- ]
|
|
|
|
|
- }
|
|
|
|
|
+
|
|
|
|
|
visibility = [ ":skia" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
--- src/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc.orig 2025-04-11 12:05:22.929220697 +0200
|
|
|
|
|
+++ src/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc 2025-04-11 20:35:59.999827501 +0200
|
|
|
|
|
@@ -13,7 +13,6 @@
|
|
|
|
|
#include "third_party/freetype_buildflags.h"
|
2025-01-12 20:37:55 +00:00
|
|
|
#include "third_party/skia/include/core/SkStream.h"
|
|
|
|
|
#include "third_party/skia/include/core/SkTypeface.h"
|
|
|
|
|
-#include "third_party/skia/include/ports/SkTypeface_fontations.h"
|
|
|
|
|
|
|
|
|
|
#if BUILDFLAG(IS_WIN)
|
|
|
|
|
#include "third_party/blink/renderer/platform/fonts/win/dwrite_font_format_support.h"
|
2025-04-26 10:14:41 +00:00
|
|
|
@@ -55,7 +54,7 @@ bool IsFreeTypeSystemRasterizer() {
|
2025-01-12 20:37:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sk_sp<SkTypeface> MakeTypefaceDefaultFontMgr(sk_sp<SkData> data) {
|
|
|
|
|
-#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
|
|
|
|
+#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
|
|
|
|
if (RuntimeEnabledFeatures::FontationsFontBackendEnabled()) {
|
|
|
|
|
std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
|
|
|
|
return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
2025-04-26 10:14:41 +00:00
|
|
|
@@ -83,10 +82,6 @@ sk_sp<SkTypeface> MakeTypefaceFallback(s
|
2025-01-12 20:37:55 +00:00
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
-sk_sp<SkTypeface> MakeTypefaceFontations(sk_sp<SkData> data) {
|
|
|
|
|
- std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
|
|
|
|
- return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
sk_sp<SkTypeface> MakeVariationsTypeface(
|
|
|
|
|
sk_sp<SkData> data,
|
2025-04-26 10:14:41 +00:00
|
|
|
@@ -188,7 +183,6 @@ bool WebFontTypefaceFactory::CreateTypef
|
2025-01-12 20:37:55 +00:00
|
|
|
const FontFormatCheck format_check(data);
|
|
|
|
|
const FontInstantiator instantiator = {
|
|
|
|
|
MakeTypefaceDefaultFontMgr,
|
|
|
|
|
- MakeTypefaceFontations,
|
|
|
|
|
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
|
|
|
|
|
MakeTypefaceFallback,
|
|
|
|
|
#endif
|