remove test code

This commit is contained in:
Mitchell Hashimoto
2022-11-24 09:22:04 -08:00
parent 6b2ca86ed8
commit cb8f55229b
3 changed files with 2 additions and 9 deletions

View File

@ -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;

View File

@ -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);

View File

@ -282,7 +282,6 @@ pub fn renderGlyph(
alloc,
atlas,
glyph_index,
self.size,
),
};