From 5fe3900efa30bb0ad87d1831a6a5e9f8b16e2d2e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 18 Jan 2024 15:02:32 -0800 Subject: [PATCH] core: Apple Emoji should be loaded on any darwin, not just macos It is available on iOS too. --- src/Surface.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index bb38b0ad7..487e25390 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -429,7 +429,7 @@ pub fn init( // people add other emoji fonts to their system, we always want to // prefer the official one. Users can override this by explicitly // specifying a font-family for emoji. - if (comptime builtin.os.tag == .macos) apple_emoji: { + if (comptime builtin.target.isDarwin()) apple_emoji: { const disco = group.discover orelse break :apple_emoji; var disco_it = try disco.discover(alloc, .{ .family = "Apple Color Emoji", @@ -442,7 +442,7 @@ pub fn init( // Emoji fallback. We don't include this on Mac since Mac is expected // to always have the Apple Emoji available on the system. - if (builtin.os.tag != .macos or font.Discover == void) { + if (comptime !builtin.target.isDarwin() or font.Discover == void) { _ = try group.addFace( .regular, .{ .fallback_loaded = try font.Face.init(font_lib, face_emoji_ttf, group.faceOptions()) },