mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
font-patcher: Optimize font tweaking for ttc
[why] When we have a ttc and tweak the contained fonts we recalculate the total checksum after each tweak while we only need to tweak it after all changes (included fonts) have been tweaked. [how] Pull the total checksum recalculation out of the subfonts loop. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
ae7d6a5744
commit
cf59464e52
1 changed files with 2 additions and 1 deletions
|
@ -421,6 +421,7 @@ class font_patcher:
|
||||||
dest_font.putshort(source_font.lowppem, 'lowestRecPPEM')
|
dest_font.putshort(source_font.lowppem, 'lowestRecPPEM')
|
||||||
if dest_font.modified:
|
if dest_font.modified:
|
||||||
dest_font.reset_table_checksum()
|
dest_font.reset_table_checksum()
|
||||||
|
if dest_font.modified:
|
||||||
dest_font.reset_full_checksum()
|
dest_font.reset_full_checksum()
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print("Can not handle font flags ({})".format(repr(error)))
|
print("Can not handle font flags ({})".format(repr(error)))
|
||||||
|
|
Loading…
Reference in a new issue