mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
font/sprite: fix 1px gap at right edge of dotted and dashed underlines
This commit is contained in:
@ -133,7 +133,7 @@ const Draw = struct {
|
||||
while (i < dot_count) : (i += 2) {
|
||||
// Ensure we never go out of bounds for the rect
|
||||
const x = @min(i * dot_width, self.width - 1);
|
||||
const width = @min(self.width - 1 - x, dot_width);
|
||||
const width = @min(self.width - x, dot_width);
|
||||
canvas.rect(.{
|
||||
.x = @intCast(i * dot_width),
|
||||
.y = @intCast(y),
|
||||
@ -154,7 +154,7 @@ const Draw = struct {
|
||||
while (i < dash_count) : (i += 2) {
|
||||
// Ensure we never go out of bounds for the rect
|
||||
const x = @min(i * dash_width, self.width - 1);
|
||||
const width = @min(self.width - 1 - x, dash_width);
|
||||
const width = @min(self.width - x, dash_width);
|
||||
canvas.rect(.{
|
||||
.x = @intCast(x),
|
||||
.y = @intCast(y),
|
||||
|
Reference in New Issue
Block a user