Skip to content

Commit

Permalink
apply glyphs centering patch in ryanoasis#1330
Browse files Browse the repository at this point in the history
  • Loading branch information
MountComb committed Jun 20, 2024
1 parent a4ddd1e commit bf54ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ class font_patcher:
x_align_distance = self.font_dim['xmin'] - sym_dim['xmin']
if sym_attr['align'] == 'c':
# Center align
x_align_distance += (self.font_dim['width'] / 2) - (sym_dim['width'] / 2)
x_align_distance += (self.font_dim['width'] * self.get_target_width(stretch) / 2) - (sym_dim['width'] / 2)
elif sym_attr['align'] == 'r':
# Right align
x_align_distance += self.font_dim['width'] * self.get_target_width(stretch) - sym_dim['width']
Expand Down

0 comments on commit bf54ba6

Please sign in to comment.