mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 17:26:09 +03:00
remove test code
This commit is contained in:
@ -296,10 +296,6 @@ pub fn create(alloc: Allocator, app: *App, config: *const Config) !*Window {
|
|||||||
.thickness = 2,
|
.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
|
// Convert our padding from points to pixels
|
||||||
const padding_x = (@intToFloat(f32, config.@"window-padding-x") * x_dpi) / 72;
|
const padding_x = (@intToFloat(f32, config.@"window-padding-x") * x_dpi) / 72;
|
||||||
const padding_y = (@intToFloat(f32, config.@"window-padding-y") * y_dpi) / 72;
|
const padding_y = (@intToFloat(f32, config.@"window-padding-y") * y_dpi) / 72;
|
||||||
|
@ -18,7 +18,8 @@ const log = std.log.scoped(.box_font);
|
|||||||
width: u32,
|
width: u32,
|
||||||
height: 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,
|
thickness: u32,
|
||||||
|
|
||||||
/// We use alpha-channel-only images for the box font so white causes
|
/// We use alpha-channel-only images for the box font so white causes
|
||||||
@ -51,13 +52,11 @@ pub fn renderGlyph(
|
|||||||
alloc: Allocator,
|
alloc: Allocator,
|
||||||
atlas: *Atlas,
|
atlas: *Atlas,
|
||||||
cp: u32,
|
cp: u32,
|
||||||
font_size: font.face.DesiredSize,
|
|
||||||
) !font.Glyph {
|
) !font.Glyph {
|
||||||
assert(atlas.format == .greyscale);
|
assert(atlas.format == .greyscale);
|
||||||
|
|
||||||
// TODO: render depending on cp
|
// TODO: render depending on cp
|
||||||
_ = cp;
|
_ = cp;
|
||||||
_ = font_size;
|
|
||||||
|
|
||||||
// Determine the config for our image buffer. The images we draw
|
// Determine the config for our image buffer. The images we draw
|
||||||
// for boxes are always 8bpp
|
// for boxes are always 8bpp
|
||||||
@ -175,7 +174,6 @@ test "all" {
|
|||||||
alloc,
|
alloc,
|
||||||
&atlas_greyscale,
|
&atlas_greyscale,
|
||||||
0x2500,
|
0x2500,
|
||||||
.{ .points = 12 },
|
|
||||||
);
|
);
|
||||||
try testing.expectEqual(@as(u32, face.width), glyph.width);
|
try testing.expectEqual(@as(u32, face.width), glyph.width);
|
||||||
try testing.expectEqual(@as(u32, face.height), glyph.height);
|
try testing.expectEqual(@as(u32, face.height), glyph.height);
|
||||||
|
@ -282,7 +282,6 @@ pub fn renderGlyph(
|
|||||||
alloc,
|
alloc,
|
||||||
atlas,
|
atlas,
|
||||||
glyph_index,
|
glyph_index,
|
||||||
self.size,
|
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user