diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-08-26 17:14:22 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-08-26 17:14:22 -0700 |
| commit | f733e58dc4be66b44fd2037f88299c488e965bd5 (patch) | |
| tree | ee4cdaf2996f6e95c003f8df103ffb3c61b45b6b | |
| parent | fc3ca689af790e4cad908b933e73287163d15058 (diff) | |
font/shaper: on macos load apple color emoji for tests
| -rw-r--r-- | src/font/shaper/harfbuzz.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/font/shaper/harfbuzz.zig b/src/font/shaper/harfbuzz.zig index e7afb3d06..ce15851c1 100644 --- a/src/font/shaper/harfbuzz.zig +++ b/src/font/shaper/harfbuzz.zig @@ -800,6 +800,18 @@ fn testShaper(alloc: Allocator) !TestShaper { if (font.options.backend != .coretext) { // Coretext doesn't support Noto's format 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 }) }); |
