From 327caf903c8e733480abb7da23c464e665ea3ee7 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Sun, 6 Jul 2025 17:20:39 -0600 Subject: [PATCH] font: fix nerd font patcher ypadding twice what it should be The nerd font patcher uses `ypadding` as a single subtraction from the cell height, which means that half of it should go to the top padding and the other half to the bottom, this was making the heavy brackets way too small lol (0.4 of the cell height instead of 0.7) --- src/font/nerd_font_attributes.zig | 4 ++-- src/font/nerd_font_codegen.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/font/nerd_font_attributes.zig b/src/font/nerd_font_attributes.zig index 817d838f8..70920bb0a 100644 --- a/src/font/nerd_font_attributes.zig +++ b/src/font/nerd_font_attributes.zig @@ -40,8 +40,8 @@ pub fn getConstraint(cp: u21) Constraint { .max_constraint_width = 1, .align_horizontal = .center, .align_vertical = .center, - .pad_top = 0.3, - .pad_bottom = 0.3, + .pad_top = 0.15, + .pad_bottom = 0.15, }, 0xe0b0, => .{ diff --git a/src/font/nerd_font_codegen.py b/src/font/nerd_font_codegen.py index f8ff7caa6..e74b2ead1 100644 --- a/src/font/nerd_font_codegen.py +++ b/src/font/nerd_font_codegen.py @@ -213,8 +213,8 @@ def emit_zig_entry_multikey(codepoints: list[int], attr: PatchSetAttributeEntry) s += f" .pad_top = {v_pad},\n" s += f" .pad_bottom = {v_pad},\n" elif y_padding: - s += f" .pad_top = {y_padding},\n" - s += f" .pad_bottom = {y_padding},\n" + s += f" .pad_top = {y_padding / 2},\n" + s += f" .pad_bottom = {y_padding / 2},\n" if xy_ratio > 0: s += f" .max_xy_ratio = {xy_ratio},\n"