update ziglyph

update ziglyph to include proper default text emoji with VS16 selector
widths

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-01-28 21:35:31 -06:00
parent c99dffaecf
commit 5c9ce93a63
2 changed files with 7 additions and 2 deletions

View file

@ -11,8 +11,8 @@
.dependencies = .{ .dependencies = .{
.ziglyph = .{ .ziglyph = .{
.url = "https://codeberg.org/dude_the_builder/ziglyph/archive/main.tar.gz", .url = "https://codeberg.org/dude_the_builder/ziglyph/archive/ac50ab06c91d2dd632ff4573c035dafe3b374aba.tar.gz",
.hash = "12208553f3f47e51494e187f4c0e6f6b3844e3993436cad4a0e8c4db4e99645967b5", .hash = "1220e097fbfb3a15a6f3484cf507f1f10ab571d1bcf519c3b5447ca727782b7a5264",
}, },
.zigimg = .{ .zigimg = .{
.url = "https://github.com/zigimg/zigimg/archive/f6998808f283f8d3c2ef34e8b4af423bc1786f32.tar.gz", .url = "https://github.com/zigimg/zigimg/archive/f6998808f283f8d3c2ef34e8b4af423bc1786f32.tar.gz",

View file

@ -40,6 +40,11 @@ test "gwidth: emoji with ZWJ" {
try testing.expectEqual(4, try gwidth("👩‍🚀", .wcwidth)); try testing.expectEqual(4, try gwidth("👩‍🚀", .wcwidth));
} }
test "gwidth: emoji with VS16 selector" {
try testing.expectEqual(2, try gwidth("\xE2\x9D\xA4\xEF\xB8\x8F", .unicode));
try testing.expectEqual(1, try gwidth("\xE2\x9D\xA4\xEF\xB8\x8F", .wcwidth));
}
test "gwidth: emoji with skin tone selector" { test "gwidth: emoji with skin tone selector" {
try testing.expectEqual(2, try gwidth("👋🏿", .unicode)); try testing.expectEqual(2, try gwidth("👋🏿", .unicode));
try testing.expectEqual(4, try gwidth("👋🏿", .wcwidth)); try testing.expectEqual(4, try gwidth("👋🏿", .wcwidth));