From bea6001cae911eb8591f609390ed40c78548f249 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Sun, 17 Nov 2024 14:23:49 +0100 Subject: [PATCH] font-patcher: Fix 2 cell glyphs with overlap [why] Glyphs that shall end up in two cells with xy scaling and overlap (for example E0C0, E0C2) end up being a bit too wide. In fact the width is the 2 cell width and 2 overlap width. [how] Apply the overlap (which is 'percent' factor) not on the concrete glyph width, which is 2*cellwidth in these cases, but base it on the one-cell-width instead. Signed-off-by: Fini Jastrow --- font-patcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/font-patcher b/font-patcher index 8a958dcfaf..b77024f3ef 100755 --- a/font-patcher +++ b/font-patcher @@ -1373,7 +1373,7 @@ class font_patcher: target_width = self.font_dim['width'] * self.get_target_width(stretch) if overlap: - target_width *= 1.0 + overlap + target_width += self.font_dim['width'] * overlap scale_ratio_x = target_width / sym_dim['width'] # font_dim['height'] represents total line height, keep our symbols sized based upon font's em