mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
mac: load emoji font last so it is not preferred for text
This commit is contained in:
@ -303,21 +303,6 @@ pub fn create(alloc: Allocator, loop: libuv.Loop, config: *const Config) !*Windo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're on Mac, then we try to use the Apple Emoji font for Emoji.
|
|
||||||
if (builtin.os.tag == .macos and font.Discover != void) {
|
|
||||||
var disco = font.Discover.init();
|
|
||||||
defer disco.deinit();
|
|
||||||
var disco_it = try disco.discover(.{
|
|
||||||
.family = "Apple Color Emoji",
|
|
||||||
.size = font_size.points,
|
|
||||||
});
|
|
||||||
defer disco_it.deinit();
|
|
||||||
if (try disco_it.next()) |face| {
|
|
||||||
log.debug("font emoji: {s}", .{try face.name()});
|
|
||||||
try group.addFace(alloc, .regular, face);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Our built-in font will be used as a backup
|
// Our built-in font will be used as a backup
|
||||||
try group.addFace(
|
try group.addFace(
|
||||||
alloc,
|
alloc,
|
||||||
@ -345,6 +330,21 @@ pub fn create(alloc: Allocator, loop: libuv.Loop, config: *const Config) !*Windo
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're on Mac, then we try to use the Apple Emoji font for Emoji.
|
||||||
|
if (builtin.os.tag == .macos and font.Discover != void) {
|
||||||
|
var disco = font.Discover.init();
|
||||||
|
defer disco.deinit();
|
||||||
|
var disco_it = try disco.discover(.{
|
||||||
|
.family = "Apple Color Emoji",
|
||||||
|
.size = font_size.points,
|
||||||
|
});
|
||||||
|
defer disco_it.deinit();
|
||||||
|
if (try disco_it.next()) |face| {
|
||||||
|
log.debug("font emoji: {s}", .{try face.name()});
|
||||||
|
try group.addFace(alloc, .regular, face);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break :group group;
|
break :group group;
|
||||||
});
|
});
|
||||||
errdefer font_group.deinit(alloc);
|
errdefer font_group.deinit(alloc);
|
||||||
|
Reference in New Issue
Block a user