From cf253a2b9cb30cd0f5051d6519402ce24b2fc9e8 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Thu, 2 Mar 2023 20:06:31 +0100 Subject: [PATCH] font-patcher: Fix align formula [why] This is more an academic fix. If we calculate widths from with bounding boxes we always need to take xmin and xmax into account. Usually xmin is zero and so it does not make any difference. But maybe one can see better what is calculated, especially as we use xmin in other cases. Signed-off-by: Fini Jastrow --- font-patcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/font-patcher b/font-patcher index 0d483fdd0..237149764 100755 --- a/font-patcher +++ b/font-patcher @@ -1355,7 +1355,7 @@ class font_patcher: if not self.args.single and '2' in sym_attr['stretch']: x_align_distance += self.font_dim['width'] # If symbol glyph is wider than target font cell, just left-align - x_align_distance = max(-sym_dim['xmin'], x_align_distance) + x_align_distance = max(self.font_dim['xmin'] - sym_dim['xmin'], x_align_distance) if overlap: overlap_width = self.font_dim['width'] * overlap