Skip to content

Commit

Permalink
font-patcher: Correct handling of right aligned proportional icons
Browse files Browse the repository at this point in the history
[why]
The right align check does produce wrong results if a proportional font
is generated.

[how]
Just skip the aspect ratio alignment re-check and leave the work to the
proportional font shifting that is done afterwards anyhow.

Fixes: #1695

Signed-off-by: Fini Jastrow <[email protected]>
  • Loading branch information
Finii committed Nov 13, 2024
1 parent 3008903 commit f530e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from __future__ import absolute_import, print_function, unicode_literals

# Change the script version when you edit this script:
script_version = "4.14.7"
script_version = "4.14.9"

version = "3.2.1"
projectName = "Nerd Fonts"
Expand Down Expand Up @@ -1568,7 +1568,7 @@ class font_patcher:
elif sym_attr['align'] == 'c':
if overlap_width > 0:
x_align_distance -= overlap_width / 2
elif sym_attr['align'] == 'r':
elif sym_attr['align'] == 'r' and not self.args.nonmono:
# Check and correct overlap; it can go wrong if we have a xy-ratio limit
target_xmax = (self.font_dim['xmin'] + self.font_dim['width']) * self.get_target_width(stretch)
target_xmax += overlap_width
Expand Down

0 comments on commit f530e22

Please sign in to comment.