mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-21 11:16:08 +03:00
font: CodepointResolver test box glyph
This commit is contained in:
@ -450,3 +450,24 @@ test "getIndex disabled font style" {
|
||||
try testing.expectEqual(@as(Collection.Index.IndexInt, 0), idx.idx);
|
||||
}
|
||||
}
|
||||
|
||||
test "getIndex box glyph" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
|
||||
var lib = try Library.init();
|
||||
defer lib.deinit();
|
||||
|
||||
const c = try Collection.init(alloc);
|
||||
|
||||
var r: CodepointResolver = .{
|
||||
.collection = c,
|
||||
.sprite = .{ .width = 18, .height = 36, .thickness = 2 },
|
||||
};
|
||||
defer r.deinit(alloc);
|
||||
|
||||
// Should find a box glyph
|
||||
const idx = r.getIndex(alloc, 0x2500, .regular, null).?;
|
||||
try testing.expectEqual(Style.regular, idx.style);
|
||||
try testing.expectEqual(@intFromEnum(Collection.Index.Special.sprite), idx.idx);
|
||||
}
|
||||
|
@ -769,6 +769,7 @@ pub const Wasm = struct {
|
||||
}
|
||||
};
|
||||
|
||||
// X
|
||||
test {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
@ -847,6 +848,7 @@ test {
|
||||
}
|
||||
}
|
||||
|
||||
// X
|
||||
test "disabled font style" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
@ -892,6 +894,7 @@ test "disabled font style" {
|
||||
}
|
||||
}
|
||||
|
||||
// X
|
||||
test "face count limit" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
@ -917,6 +920,7 @@ test "face count limit" {
|
||||
));
|
||||
}
|
||||
|
||||
// X
|
||||
test "box glyph" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
|
Reference in New Issue
Block a user