Create utils.Rect struct for geometries

Also fixed a crash that I'm really not sure how I didn't have happen
before during Output.create()

Right now, only Window is updated to use Rect. I'll try updating all
instances of x,y,width,height combo to use it.
This commit is contained in:
Ben Buhse 2026-02-16 17:16:25 -06:00
commit 5333b4cbe0
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
7 changed files with 141 additions and 129 deletions

View file

@ -15,7 +15,7 @@ timezone: zeit.timezone.TimeZone,
options: Options,
fcft_fonts: *fcft.Font,
font_scale: u31,
font_scale: u31 = 1,
output: *Output,
@ -366,6 +366,7 @@ fn getFcftFonts(fonts: []const u8, scale: u31) !*fcft.Font {
while (it.next()) |font| {
if (scale > 1) {
// If scale >1, we append :dpi so we can scale the font
log.debug("bwbuhse {d} {d}", .{ base_dpi, scale });
const scaled = try arena_alloc.dupeZ(
u8,
try std.fmt.allocPrint(arena_alloc, "{s}:dpi={}", .{ font, @as(u32, base_dpi) * scale }),