diff --git a/src/Window.zig b/src/Window.zig index f5243deab..1373e3b58 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -296,10 +296,6 @@ pub fn create(alloc: Allocator, app: *App, config: *const Config) !*Window { .thickness = 2, }; - // TEST - const idx = (try font_group.indexForCodepoint(alloc, 0x2500, .regular, null)).?; - _ = try font_group.renderGlyph(alloc, idx, 0x2500, null); - // Convert our padding from points to pixels const padding_x = (@intToFloat(f32, config.@"window-padding-x") * x_dpi) / 72; const padding_y = (@intToFloat(f32, config.@"window-padding-y") * y_dpi) / 72; diff --git a/src/font/BoxFont.zig b/src/font/BoxFont.zig index 4dfb4eb2e..a4b7a6392 100644 --- a/src/font/BoxFont.zig +++ b/src/font/BoxFont.zig @@ -18,7 +18,8 @@ const log = std.log.scoped(.box_font); width: u32, height: u32, -/// Base thickness value for lines of the box. This is in points. +/// Base thickness value for lines of the box. This is in pixels. If you +/// want to do any DPI scaling, it is expected to be done earlier. thickness: u32, /// We use alpha-channel-only images for the box font so white causes @@ -51,13 +52,11 @@ pub fn renderGlyph( alloc: Allocator, atlas: *Atlas, cp: u32, - font_size: font.face.DesiredSize, ) !font.Glyph { assert(atlas.format == .greyscale); // TODO: render depending on cp _ = cp; - _ = font_size; // Determine the config for our image buffer. The images we draw // for boxes are always 8bpp @@ -175,7 +174,6 @@ test "all" { alloc, &atlas_greyscale, 0x2500, - .{ .points = 12 }, ); try testing.expectEqual(@as(u32, face.width), glyph.width); try testing.expectEqual(@as(u32, face.height), glyph.height); diff --git a/src/font/Group.zig b/src/font/Group.zig index 8003f1015..b2cd242ea 100644 --- a/src/font/Group.zig +++ b/src/font/Group.zig @@ -282,7 +282,6 @@ pub fn renderGlyph( alloc, atlas, glyph_index, - self.size, ), };