这是indexloc提供的服务,不要输入任何密码
Skip to content

Icons are rendered small and low on Windows Terminal and iTerm (have bisect) #634

@tomKPZ

Description

@tomKPZ

nf-small-icons

Repro steps:

  • Run font-patcher -lwc src/unpatched-fonts/FiraCode/Retina/FiraCode-Retina.ttf
  • Install the font and enable it in Windows Terminal

I've bisected the issue to this commit:
d0bf73a

Reverting the changes to font-patcher fixes the issue in Windows Terminal (I haven't tested in iTerm):

diff --git a/font-patcher b/font-patcher
index b904c409..d3b419ba 100755
--- a/font-patcher
+++ b/font-patcher
@@ -773,16 +773,17 @@ 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions