This commit is contained in:
Kovid Goyal
2024-05-29 14:09:52 +05:30
parent 0cc8dd28de
commit 0633000c50
3 changed files with 12 additions and 5 deletions

View File

@@ -197,6 +197,12 @@ class FontSpec(NamedTuple):
a(key, f'{val:g}')
return ' '.join(ans)
def __str__(self) -> str:
return self.as_setting
def __repr__(self) -> str:
return repr(str(self))
Descriptor = Union[FontConfigPattern, CoreTextFont]

View File

@@ -323,6 +323,7 @@ def get_font_from_spec(
ans = get_fine_grained_font(spec, bold, italic, resolved_medium_font=resolved_medium_font, family_axis_values=family_axis_values,
match_is_more_specific_than_family=match_is_more_specific_than_family)
if spec.features:
ans = ans.copy()
ans['features'] = spec.features
return ans
family = spec.system or ''