From 59c45ba4eff539d2a83a7d7004f056b9860d3253 Mon Sep 17 00:00:00 2001 From: "Daniel M. Capella" Date: Sun, 12 Apr 2020 01:59:16 -0400 Subject: [PATCH] Remove negative bearings on 2048-em glyphs Bisected an overlap issue in status bars to https://github.com/ryanoasis/nerd-fonts/pull/283/files#diff-3b192ccaec850d73e6540b7eddd8b50cL710-R734 --- font-patcher | 11 +++++------ .../Symbols-2048-em Nerd Font Complete.ttf | Bin 834148 -> 841552 bytes 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/font-patcher b/font-patcher index dbecf6053..b904c409e 100755 --- a/font-patcher +++ b/font-patcher @@ -773,17 +773,16 @@ class font_patcher: align_matrix = psMat.translate(x_align_distance, y_align_distance) self.sourceFont.transform(align_matrix) - # Ensure after horizontal adjustments and centering that the glyph - # does not overlap the bearings (edges) - self.remove_glyph_neg_bearings(self.sourceFont[currentSourceFontGlyph]) - # Needed for setting 'advance width' on each glyph so they do not overlap, # also ensures the font is considered monospaced on Windows by setting the # same width for all character glyphs. This needs to be done for all glyphs, # even the ones that are empty and didn't go through the scaling operations. - # it should come after setting the glyph bearings self.set_glyph_width_mono(self.sourceFont[currentSourceFontGlyph]) + # Ensure after horizontal adjustments and centering that the glyph + # does not overlap the bearings (edges) + self.remove_glyph_neg_bearings(self.sourceFont[currentSourceFontGlyph]) + # reset selection so iteration works properly @TODO fix? rookie misunderstanding? # This is likely needed because the selection was changed when the glyph was copy/pasted if symbolFontStart == 0: @@ -801,7 +800,7 @@ class font_patcher: for glyph in self.sourceFont.glyphs(): if (glyph.width == self.font_dim['width']): - # Don't tough the (negative) bearings if the width is ok + # Don't touch the (negative) bearings if the width is ok # Ligartures will have these. continue diff --git a/src/glyphs/Symbols-2048-em Nerd Font Complete.ttf b/src/glyphs/Symbols-2048-em Nerd Font Complete.ttf index fcffff3e013856be05d1b2c05dad557cc7259bbe..60db517ae43bb73188bb76f531dd64904cf01b62 100644 GIT binary patch delta 15303 zcmcJWdz4*OeaFw-d(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