mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Linux: Fix a regression in the previous release that caused automatic selection of fonts when using aliases such as "monospace" to not work
Fix #1209
This commit is contained in:
@@ -9,6 +9,10 @@ Changelog
|
|||||||
- Fix passing input via the pipe action to a program without a window not
|
- Fix passing input via the pipe action to a program without a window not
|
||||||
working.
|
working.
|
||||||
|
|
||||||
|
- Linux: Fix a regression in the previous release that caused automatic
|
||||||
|
selection of fonts when using aliases such as "monospace" to not work
|
||||||
|
(:iss:`1209`)
|
||||||
|
|
||||||
0.13.0 [2018-12-05]
|
0.13.0 [2018-12-05]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,13 @@ def find_best_match(family, bold=False, italic=False, monospaced=True):
|
|||||||
if val:
|
if val:
|
||||||
candidates = font_map[map_key].get(family_name_to_key(val))
|
candidates = font_map[map_key].get(family_name_to_key(val))
|
||||||
if candidates:
|
if candidates:
|
||||||
|
if len(candidates) == 1:
|
||||||
|
# happens if the family name is an alias, so we search with
|
||||||
|
# the actual family name to see if we can find all the
|
||||||
|
# fonts in the family.
|
||||||
|
full_name_candidates = font_map['family_map'].get(family_name_to_key(candidates[0]['family']))
|
||||||
|
if full_name_candidates and len(full_name_candidates) > 1:
|
||||||
|
candidates = full_name_candidates
|
||||||
candidates.sort(key=score)
|
candidates.sort(key=score)
|
||||||
return candidates[0]
|
return candidates[0]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user