mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-01 16:55:57 +02:00
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
This commit is contained in:
parent
ae56e33e93
commit
d0bf73a19c
11
font-patcher
11
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
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user