mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
fix(font/sprite): avoid underflow
There's a degenerate case where height < line_pos
This commit is contained in:
@ -50,7 +50,7 @@ pub fn renderGlyph(
|
||||
// bottom of the cell. We want the top of the glyph to be at line_pos
|
||||
// from the TOP of the cell, and then offset by the offset_y from the
|
||||
// draw function.
|
||||
.offset_y = @as(i32, @intCast(height - line_pos)) - offset_y,
|
||||
.offset_y = @as(i32, @intCast(height -| line_pos)) - offset_y,
|
||||
.atlas_x = region.x,
|
||||
.atlas_y = region.y,
|
||||
.advance_x = @floatFromInt(width),
|
||||
|
Reference in New Issue
Block a user