query_names: Only consider basic language

[why]
We have now fonts where names for multiple languages are set
(differently) but we need to compare only the base language which is
English US.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2024-04-03 09:28:13 +02:00 committed by Fini
parent 51c917212c
commit c1161d4762

View file

@ -12,7 +12,7 @@ import fontforge
def get_sfnt_dict(font): def get_sfnt_dict(font):
"""Extract SFNT table as nice dict""" """Extract SFNT table as nice dict"""
return { k: v for l, k, v in font.sfnt_names } return { k: v for l, k, v in font.sfnt_names if l == 'English (US)' }
def format_names(header, *stuff): def format_names(header, *stuff):
"""Unify outputs (with header)""" """Unify outputs (with header)"""