mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
...
This commit is contained in:
@@ -19,9 +19,9 @@ attr_map = {(False, False): 'font_family',
|
|||||||
def create_font_map(all_fonts):
|
def create_font_map(all_fonts):
|
||||||
ans = {'family_map': {}, 'ps_map': {}, 'full_map': {}}
|
ans = {'family_map': {}, 'ps_map': {}, 'full_map': {}}
|
||||||
for x in all_fonts:
|
for x in all_fonts:
|
||||||
f = (x['family'] or '').lower()
|
f = (x.get('family') or '').lower()
|
||||||
full = (x['full_name'] or '').lower()
|
full = (x.get('full_name') or '').lower()
|
||||||
ps = (x['postscript_name'] or '').lower()
|
ps = (x.get('postscript_name') or '').lower()
|
||||||
ans['family_map'].setdefault(f, []).append(x)
|
ans['family_map'].setdefault(f, []).append(x)
|
||||||
ans['ps_map'].setdefault(ps, []).append(x)
|
ans['ps_map'].setdefault(ps, []).append(x)
|
||||||
ans['full_map'].setdefault(full, []).append(x)
|
ans['full_map'].setdefault(full, []).append(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user