1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-01 16:55:57 +02:00

Merge branch 'update-symbols-only-249-429' of https://github.com/polyzen/nerd-fonts into polyzen-update-symbols-only-249-429

This commit is contained in:
Ryan L McIntyre 2020-09-06 04:34:52 -07:00
commit 8b4fca86f8
3 changed files with 5 additions and 6 deletions

View File

@ -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