mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
font/shaper: on macos load apple color emoji for tests
This commit is contained in:
@ -800,6 +800,18 @@ fn testShaper(alloc: Allocator) !TestShaper {
|
|||||||
if (font.options.backend != .coretext) {
|
if (font.options.backend != .coretext) {
|
||||||
// Coretext doesn't support Noto's format
|
// Coretext doesn't support Noto's format
|
||||||
try cache_ptr.group.addFace(.regular, .{ .loaded = try Face.init(lib, testEmoji, .{ .points = 12 }) });
|
try cache_ptr.group.addFace(.regular, .{ .loaded = try Face.init(lib, testEmoji, .{ .points = 12 }) });
|
||||||
|
} else {
|
||||||
|
// On CoreText we want to load Apple Emoji, we should have it.
|
||||||
|
var disco = font.Discover.init();
|
||||||
|
defer disco.deinit();
|
||||||
|
var disco_it = try disco.discover(.{
|
||||||
|
.family = "Apple Color Emoji",
|
||||||
|
.size = 12,
|
||||||
|
});
|
||||||
|
defer disco_it.deinit();
|
||||||
|
var face = (try disco_it.next()).?;
|
||||||
|
errdefer face.deinit();
|
||||||
|
try cache_ptr.group.addFace(.regular, .{ .deferred = face });
|
||||||
}
|
}
|
||||||
try cache_ptr.group.addFace(.regular, .{ .loaded = try Face.init(lib, testEmojiText, .{ .points = 12 }) });
|
try cache_ptr.group.addFace(.regular, .{ .loaded = try Face.init(lib, testEmojiText, .{ .points = 12 }) });
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user