Ensure bold face is at least as heavy as regular face when auto selecting

This commit is contained in:
Kovid Goyal
2024-05-19 10:46:36 +05:30
parent d205b147eb
commit 679abf0e84
2 changed files with 31 additions and 5 deletions

View File

@@ -99,11 +99,15 @@ class Selection(BaseTest):
if has('SourceCodeVF'):
opts = Options()
opts.font_family = parse_font_spec('family="SourceCodeVF" variable_name="SourceCodeUpright" style="Black"')
opts.font_family = parse_font_spec('family="SourceCodeVF" variable_name="SourceCodeUpright" style="Bold"')
ff = get_font_files(opts)
face = face_from_descriptor(ff['medium'])
self.ae(get_named_style(face)['name'], 'Black')
self.ae(get_named_style(face)['name'], 'Bold')
face = face_from_descriptor(ff['italic'])
self.ae(get_named_style(face)['name'], 'Bold Italic')
face = face_from_descriptor(ff['bold'])
self.ae(get_named_style(face)['name'], 'Black')
face = face_from_descriptor(ff['bi'])
self.ae(get_named_style(face)['name'], 'Black Italic')
if has('cascadia code'):
opts = Options()