Skip to content

Commit

Permalink
font-patcher: Fix debug format string
Browse files Browse the repository at this point in the history
[why]
The format string is invalid and results in a runtime error if that
particular warning is issued (which is only the case for Terminus).

[how]
A verbatim percent sign must be encoded as '%%'.

[note]
This has already been fixed before with commit
  f81564f  font-patcher: Fix typo in logger output

but the change has been lost by rebasing :-(

See also #1350

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
  • Loading branch information
Finii committed Jan 15, 2024
1 parent 148c288 commit 393c666
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 @@ -1154,7 +1154,7 @@ class font_patcher:
if our_btb == hhea_btb:
metrics = Metric.TYPO if use_typo else Metric.WIN # conforming font
elif abs(our_btb - hhea_btb) / our_btb < 0.03:
logger.info("Font vertical metrics slightly off (%.1f%)", (our_btb - hhea_btb) / our_btb * 100.0)
logger.info("Font vertical metrics slightly off (%.1f%%)", (our_btb - hhea_btb) / our_btb * 100.0)
metrics = Metric.TYPO if use_typo else Metric.WIN
else:
# Try the other metric
Expand Down

0 comments on commit 393c666

Please sign in to comment.