From 3c882e364ad82753d030ee51a3b219ae50bfb0bf Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 8 May 2024 12:18:35 -0700 Subject: [PATCH] font: disable CJK unification fallback with freetype rasterizer --- src/font/discovery.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/font/discovery.zig b/src/font/discovery.zig index b44878cb9..a93574e07 100644 --- a/src/font/discovery.zig +++ b/src/font/discovery.zig @@ -427,6 +427,13 @@ pub const CoreText = struct { ) !?*macos.text.FontDescriptor { _ = self; + if (comptime options.backend.hasFreetype()) { + // If we have freetype, we can't use CoreText to find a font + // that supports a specific codepoint because we need to + // have a CoreText font to be able to do so. + return null; + } + assert(desc.codepoint > 0); // Get our original font. This is dependent on the requestd style