mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
font/sprite: fix light arc character for odd thicknesses
+ update Box.ppm ground truth image
This commit is contained in:
@ -2127,8 +2127,8 @@ fn draw_light_arc(
|
|||||||
const float_width: f64 = @floatFromInt(self.width);
|
const float_width: f64 = @floatFromInt(self.width);
|
||||||
const float_height: f64 = @floatFromInt(self.height);
|
const float_height: f64 = @floatFromInt(self.height);
|
||||||
const float_thick: f64 = @floatFromInt(thick_px);
|
const float_thick: f64 = @floatFromInt(thick_px);
|
||||||
const center_x: f64 = @floatFromInt(self.width / 2 + self.width % 2);
|
const center_x: f64 = @as(f64, @floatFromInt((self.width -| thick_px) / 2)) + float_thick / 2;
|
||||||
const center_y: f64 = @floatFromInt(self.height / 2 + self.height % 2);
|
const center_y: f64 = @as(f64, @floatFromInt((self.height -| thick_px) / 2)) + float_thick / 2;
|
||||||
|
|
||||||
const r = @min(float_width, float_height) / 2;
|
const r = @min(float_width, float_height) / 2;
|
||||||
|
|
||||||
|
BIN
src/font/sprite/testdata/Box.ppm
vendored
BIN
src/font/sprite/testdata/Box.ppm
vendored
Binary file not shown.
Reference in New Issue
Block a user