Add more font selection tests

This commit is contained in:
Kovid Goyal
2024-05-15 14:35:51 +05:30
parent 46f391ae63
commit b06a2bb937
2 changed files with 14 additions and 7 deletions

View File

@@ -256,7 +256,7 @@ def get_font_from_spec(
if bold or italic:
assert resolved_medium_font is not None
family = resolved_medium_font['family']
if is_variable(resolved_medium_font):
if is_variable(resolved_medium_font) or is_actually_variable_despite_fontconfigs_lies(resolved_medium_font):
v = find_bold_italic_variant(resolved_medium_font, bold, italic)
if v is not None:
return v