mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06: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 Box = @import("Box.zig");
|
||||||
const underline = @import("underline.zig");
|
const underline = @import("underline.zig");
|
||||||
|
|
||||||
|
const log = std.log.scoped(.font_sprite);
|
||||||
|
|
||||||
/// The cell width and height.
|
/// The cell width and height.
|
||||||
width: u32,
|
width: u32,
|
||||||
height: u32,
|
height: u32,
|
||||||
@ -48,7 +50,12 @@ pub fn renderGlyph(
|
|||||||
atlas: *font.Atlas,
|
atlas: *font.Atlas,
|
||||||
cp: u32,
|
cp: u32,
|
||||||
) !font.Glyph {
|
) !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.
|
// Safe to ".?" because of the above assertion.
|
||||||
return switch (Kind.init(cp).?) {
|
return switch (Kind.init(cp).?) {
|
||||||
|
Reference in New Issue
Block a user