config: add remaining font modifiers

This commit is contained in:
Mitchell Hashimoto
2023-10-04 22:08:19 -07:00
parent 16cfb14200
commit b98cc3d79f
6 changed files with 26 additions and 4 deletions

View File

@@ -211,7 +211,8 @@ pub fn init(alloc: Allocator, options: renderer.Options) !Metal {
options.font_group.group.sprite = font.sprite.Face{
.width = metrics.cell_width,
.height = metrics.cell_height,
.thickness = 2 * @as(u32, if (options.config.font_thicken) 2 else 1),
.thickness = metrics.underline_thickness *
@as(u32, if (options.config.font_thicken) 2 else 1),
.underline_position = metrics.underline_position,
};

View File

@@ -548,7 +548,7 @@ fn resetFontMetrics(
font_group.group.sprite = font.sprite.Face{
.width = metrics.cell_width,
.height = metrics.cell_height,
.thickness = 2 * @as(u32, if (font_thicken) 2 else 1),
.thickness = metrics.underline_thickness * @as(u32, if (font_thicken) 2 else 1),
.underline_position = metrics.underline_position,
};