You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use a fallback font to display missing characters #573
My shell prompt displays a hourglass character to indicate background jobs. This character is displayed as a rectangular block in mintty:
Gnome terminal displays the character properly:
This is how I print this character. I'm using fish shell, but the problem is present on bash as well.
I tried various fonts, but the problem seems to be unaffected by this.
The rectangular block indicates that the character is not available in the font being used. This is not a bug as such. However, the character is displayed also, e.g., in notepad, configured to the same font as mintty. The only explanation that comes to my mind is that different "font fall-back" mechanisms of Windows are used. I don't know how this could be changed. Maybe it's not possible with the current output API (ExtTextOut).
Yes, looks like notepad goes through available fonts to find one with the missing character. It would be nice if mintty could do that. Thanks for help anyway 😄
Windows Font Linking can be configured in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
If you add an entry for your preferred mintty text font, it might work.
Maybe something similar can be achieved by Windows API calls, so mintty could establish some reasonable default behaviour. Suggestions welcome.
Good that you could configure a personal workaround.
However, as a generic improvement, this approach is not suitable for mintty.
See my comment in #605.
Thanks, I see in the code it uses ExtTextOutW like mintty; if you can identify where/how it handles font fallback and ligatures, I will take a closer look.
Activity
ffigiel commentedon Aug 5, 2016
I'm using cygwin but on its side everything looks good:
mintty commentedon Aug 5, 2016
The rectangular block indicates that the character is not available in the font being used. This is not a bug as such. However, the character is displayed also, e.g., in notepad, configured to the same font as mintty. The only explanation that comes to my mind is that different "font fall-back" mechanisms of Windows are used. I don't know how this could be changed. Maybe it's not possible with the current output API (ExtTextOut).
ffigiel commentedon Aug 5, 2016
Yes, looks like notepad goes through available fonts to find one with the missing character. It would be nice if mintty could do that. Thanks for help anyway 😄
[-]Some unicode characters are displayed as blocks[/-][+]Use a fallback font to display missing characters[/+]mintty commentedon Aug 9, 2016
Windows Font Linking can be configured in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
If you add an entry for your preferred mintty text font, it might work.
Maybe something similar can be achieved by Windows API calls, so mintty could establish some reasonable default behaviour. Suggestions welcome.
mintty commentedon Aug 9, 2016
Further information:
https://msdn.microsoft.com/en-us/goglobal/bb688134.aspx
http://archives.miloush.net/michkap/archive/2005/10/01/476022.html
Perlence commentedon Oct 23, 2016
Font linking does help, thank you!
mintty commentedon Oct 23, 2016
Good that you could configure a personal workaround.
However, as a generic improvement, this approach is not suitable for mintty.
See my comment in #605.
Perlence commentedon Oct 24, 2016
@mintty Latest SciTE supports font fallback and also ligatures:
mintty commentedon Oct 25, 2016
Thanks, I see in the code it uses ExtTextOutW like mintty; if you can identify where/how it handles font fallback and ligatures, I will take a closer look.
option UnderlineManual, Uniscribe support for left-to-right text (#573,
mintty commentedon Dec 4, 2016
Released Uniscribe support in 2.7.1.
This does not solve all potential font fallback cases, though.
musm commentedon Dec 4, 2016
thank you!
Perlence commentedon Dec 5, 2016
@mintty Amazing work!
change default FontRender=uniscribe (#605, #573)
mintty commentedon Mar 11, 2017
Released 2.7.5 with default FontRender=uniscribe.
option UnderlineManual, Uniscribe support for left-to-right text (min…
change default FontRender=uniscribe (mintty#605, mintty#573)