mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
font-patcher: Fix align formula
[why] This is more an academic fix. If we calculate widths from with bounding boxes we always need to take xmin and xmax into account. Usually xmin is zero and so it does not make any difference. But maybe one can see better what is calculated, especially as we use xmin in other cases. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
ac3cb23929
commit
cf253a2b9c
1 changed files with 1 additions and 1 deletions
|
@ -1355,7 +1355,7 @@ class font_patcher:
|
|||
if not self.args.single and '2' in sym_attr['stretch']:
|
||||
x_align_distance += self.font_dim['width']
|
||||
# If symbol glyph is wider than target font cell, just left-align
|
||||
x_align_distance = max(-sym_dim['xmin'], x_align_distance)
|
||||
x_align_distance = max(self.font_dim['xmin'] - sym_dim['xmin'], x_align_distance)
|
||||
|
||||
if overlap:
|
||||
overlap_width = self.font_dim['width'] * overlap
|
||||
|
|
Loading…
Reference in a new issue