From b112fe12de77ca506dba366be0a7754d5988525b Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Sun, 12 Feb 2023 16:59:29 +0100 Subject: [PATCH] font-patcher: Fix: Fix line gap redistribution [why] With commit e69a025a8 font-patcher: Fix line gap redistribution we fixed the wrong adding instead of subtraction of the bottom gap part from the descenders. At least this was done for HHEA and TYPO values. With WIN values the descenders have positive (!) numbers, so the sign was not changed for the WIN case. But that is wrong, as we are already in the ymin xmax coordinate system (and took the negative of the WIN descenders). So of course here also we need to subtract and not add. Mentioned in: #1116 Signed-off-by: Fini Jastrow --- font-patcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/font-patcher b/font-patcher index 0d1427792..b0c451358 100755 --- a/font-patcher +++ b/font-patcher @@ -1018,7 +1018,7 @@ class font_patcher: self.font_dim['ymin'] = self.sourceFont.os2_typodescent - half_gap(self.sourceFont.os2_typolinegap, False) self.font_dim['ymax'] = self.sourceFont.os2_typoascent + half_gap(self.sourceFont.os2_typolinegap, True) else: - self.font_dim['ymin'] = -self.sourceFont.os2_windescent + half_gap(win_gap, False) + self.font_dim['ymin'] = -self.sourceFont.os2_windescent - half_gap(win_gap, False) self.font_dim['ymax'] = self.sourceFont.os2_winascent + half_gap(win_gap, True) # Calculate font height