mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
font: clear up some logging
This commit is contained in:
@ -21,6 +21,8 @@ const Sprite = font.sprite.Sprite;
|
||||
const Box = @import("Box.zig");
|
||||
const underline = @import("underline.zig");
|
||||
|
||||
const log = std.log.scoped(.font_sprite);
|
||||
|
||||
/// The cell width and height.
|
||||
width: u32,
|
||||
height: u32,
|
||||
@ -48,7 +50,12 @@ pub fn renderGlyph(
|
||||
atlas: *font.Atlas,
|
||||
cp: u32,
|
||||
) !font.Glyph {
|
||||
if (std.debug.runtime_safety) assert(self.hasCodepoint(cp, null));
|
||||
if (std.debug.runtime_safety) {
|
||||
if (!self.hasCodepoint(cp, null)) {
|
||||
log.err("invalid codepoint cp={x}", .{cp});
|
||||
unreachable; // crash
|
||||
}
|
||||
}
|
||||
|
||||
// Safe to ".?" because of the above assertion.
|
||||
return switch (Kind.init(cp).?) {
|
||||
|
Reference in New Issue
Block a user