New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended font weight support? #520
Comments
Some general remarks first: |
Code lines involved for configuration (winctrls.c):
|
Taking up your case, you might want to use the Medium weight for normal display (and not use the "BoldAsFont" option). |
In the description of the LOGFONT structure (https://technet.microsoft.com/en-us/aa911419), lfWeight, it says "400 is normal and 700 is bold". This indicates that Windows support for more distinct handling of font weights is weak. Thus the actual problem is a genuine Windows issue. I don't feel too compelled to craft a workaround for that. Paches welcome, though. |
Previous observations about the Windows font selection menu were not proper; it does actually support more than 2 weights. |
From what happens with the "face" 'Foo Medium', it looks like Windows will just choose the 600 version. |
Released a number of font configuration improvements in 2.2.4. |
Wow, thanks! |
I've uploaded a font weight selection tweak enforcing selected boldness, see |
Released tweak in 2.3.6 to enforce boldness if selected explicitly. |
Mintty will fail to select a font if its 'Weight' info is neither 'Book' (i.e. Regular) nor 'Bold', and when its
lfFaceName
, or 'PostScript 'Family Name' in the font, is not changed to show its weight.So imagine a font 'Foo', with two weights 'Regular' and 'Medium':
When the user tries to choose 'Foo Medium', mintty will only record
"Foo"
as the face name, and since this is not a bold,is_bold
is not written either. What mintty ends up doing will be choosingFoo
, soFoo Regular
in the end. Interestingly, hand-specifyingFont=Foo Medium
works, although one may really expect the definition of face/family names inlpszFace
to be the really same as the one inlfFaceName
.For a real life example, try Inziu Iosevka SC 1.7.5. This font marks its bold weight as demi (be5invis/Iosevka#68), making it not selectable.
Font=Inziu Iosevka SC Bold
ormintty -o font='Inziu Iosevka SC Bold'
gives you the expected image of everything being bold (which is, well, hardly enjoyed by anyone).The text was updated successfully, but these errors were encountered: