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
Heavy symbols (e.g. heavy check mark) appear squashed in Consolas font #892
I've noticed that heavy symbols like heavy check mark (U+2714) or heavy greek cross (U+271A) appear squashed in mintty when using the Consolas font. I've attempted to use secondary fonts to have it fallback to Monaco (which I have installed) since it seems like it supports those characters, but it doesn't appear to be working. I set Font1=Consolas and Font2=Monaco, but it just defaulted to Lucida Console when I did that, and setting Font=Consolas and Font2=Monaco just applied regular Consolas.
How can I get these heavy symbols to display properly while still using the Consolas font for regular characters?
The affected symbols appear to be wider than a single character cell. This often leads to clipped character rendering which is of course not good in general. Therefore mintty has some heuristics that detect glyphs that are too wide and displays them narrowed.
About secondary fonts, these would additionally have to be activated with option FontChoice. However, the feature is only supported per "script" (like Latin, Greek, Cyrillic), not per arbitrary Unicode range (the characters are in the Dingbats range).
I could not reproduce the narrowed appearance with Consolas, what's your font size and screen resolution?
If the resulting rendering is not considered appreciable, by 2 or 3 commenting people, we can talk about an option to disable narrowing, or extending the secondary font option to other ranges, or both...
Sorry, I didn't mean to ask the screen size but its density / DPI / "scaling" factor (like 100%/125%/150% in Windows).
No, Dingbats is not in a script range. Unicode "scripts" refer to language-specific character sets; Latin is a script, Han, Hebrew or Arabic.
This time I can reproduce it at least with one of the sample characters, ❐.
It is rendered wide in mintty 3.0.1. However, the resulting glyph is considerably wider than a character cell; verify this with echo -e '\u2750x'. The assumedly better appearance in the prompt status line is only due to the fact that they are followed by space there. So this was actually a bug, which mintty 3.0.2 fixed as listed in the change log:
Check functions (width, glyph) consult proper attributes and font.
So this is a design issue. Proposals are welcome, e.g.:
An option to disable auto-narrowing. At the cost of overlapping such characters with subsequent glyphs, obviously.
Auto-magic to detect whether a wide glyph is followed by white space and not narrow it in that case.
Both of those suggestions sound good to me, although the latter won't solve my issue as in one of the places it's used in Git Bash Prompt it is not followed by a space.
That being said, I'm not seeing it take up more space than a single character, so not sure why it would need to be clipped by the current glyph-magic. See these screenshots from Consolas 12pt with v3.0.1:
For now reverting to 3.0.1 fixed the issue for me, thanks @murthyl for the tip!
I'm not seeing it take up more space than a single character
You can see it in @murthyl's second screenshot above. It may vary by character but also with font size and DPI mapping, and maybe also with the font version.
About the prompt, I see a space after every symbol @murthyl's screenshot. If you have another prompt, please send a screen log (or prompt definition).
Note that the latter two characters, U+2705 and U+26A1, have the Unicode Wide property (as defined in EastAsianWidth.txt), so lxterminal is actually wrong about them. They are also emojis. With configuration Emojis=emojione, I get the following appearance (Consolas 14pt, 100% screen) which looks OK for me:
The current rendering is not ideal for me. I'll stick with 3.0.1 if the current behavior in 3.0.2 onwards is considered "works as designed". Feel free to close the issue if no further work is planned for this.
Would it be possible to add a setting to go back to the pre-3.0.2 auto-narrowing behavior for certain unicode blocks like dingbats? I understand that this was fixing an existing bug, however as it seems non-trivial to find a generic "proper" fix for this it would be a surefire way to solve the problem for those of us affected by it.
A better solution would be to adjust the scaling from 0.5 to 0.7 or 0.8, maybe configurable if it must,
and maybe even dynamically adapated to the respective glyph width (expect some performance penalty maybe).
A configurable scaling for certain characters/blocks seems like a good solution. I'm worried about dynamic widths as it doesn't seem to be consistent across devices.
Normally if you want to ensure a particular appearance of certain glyphs, you pick a font whose characteristics match those you consider important e.g. I chose DejaVu Sans Mono for my systems, browsers, editors, terminals, to ensure that I could easily distinguish between digits, letters, and punctuation which look more similar in other fonts at smaller sizes.
I think selection of an appropriate (perhaps heavy weight) font is a better approach to ensuring that you get sufficiently heavy HEAVY symbols, rather than adding more mintty options and tweaks for a very narrow requirement, which may have unfortunate effects on the fonts used by the majority of the user base, and increased chances of issues and overheads for everyone.
If those glyphs are holes in other fonts you prefer for other purposes, you may configure the fonts with the heavy symbols as fallbacks for the fonts which do not supply those symbols, using Windows font linking, or fontconfig font fallback.
There are a good number of open source and free fonts from various sources: GNU, Google, SIL, and many other sites, with characteristics matching just about any requirement, and I have never failed to find one which matches specific needs, perhaps with some additional effort required.
Cygwin also has a great selection packaged for easy installation, which you can just drag and drop into /Windows/Fonts/ after install, as I don't believe mintty can use fontconfig fonts:
I prefer to use the Consolas font and don't feel that I should have to change my font in order to avoid squashed symbols. I don't have a particular need for the heavy checkmark to be extremely heavy, I just don't want it to be squashed. I have already tried font fallbacks but it didn't solve the issue.
If there is no solution to this problem without causing negative side effects for others I am happy to stick with 3.0.1, however as @mintty has continued to work on this (thank you!) I feel we'll be able to come up with a solution that works for everyone.
I just wanted to follow up. I recently installed some new Cygwin packages (not sure the full list due to dependencies), and one of them seems to have messed with the rendering. I'm now seeing the "glyph overlap" that was previously described, and that I had never seen before. Using CharNarrowing=100 shows the glyph as clipped now. Setting to CharNarrowing=50 looks better, but still not fully correct. Really not sure what package could be causing this issue.
Activity
BrianInglis commentedon Jul 16, 2019
Depending on your localization MS sometimes define linked fonts used as fallbacks.
You may also define your own linked fonts to use as fallbacks.
Check which fonts on your system have linked fonts as fallbacks.
See https://docs.microsoft.com/en-us/globalization/input/font-technology#font-linking
BrianInglis commentedon Jul 16, 2019
Assuming you have Cygwin installed, possibly the easiest way to list font links is:
FontLink_SystemLink.reg.txt
mintty commentedon Jul 16, 2019
The affected symbols appear to be wider than a single character cell. This often leads to clipped character rendering which is of course not good in general. Therefore mintty has some heuristics that detect glyphs that are too wide and displays them narrowed.
About secondary fonts, these would additionally have to be activated with option
FontChoice. However, the feature is only supported per "script" (like Latin, Greek, Cyrillic), not per arbitrary Unicode range (the characters are in the Dingbats range).mintty commentedon Jul 16, 2019
I could not reproduce the narrowed appearance with Consolas, what's your font size and screen resolution?
If the resulting rendering is not considered appreciable, by 2 or 3 commenting people, we can talk about an option to disable narrowing, or extending the secondary font option to other ranges, or both...
mintty commentedon Jul 16, 2019
If you want to check out how your example looks like without narrowing, you could uncomment line 2059 in file term.c:
//tattr.attr |= ATTR_NARROW;jaynavar commentedon Jul 16, 2019
I'm using font size 12. Screen resolution is 1920x1080.
Isn't dingbats in the
Zyyyscript? Shouldn't something like this have worked (it doesn't)?:mintty commentedon Jul 16, 2019
Sorry, I didn't mean to ask the screen size but its density / DPI / "scaling" factor (like 100%/125%/150% in Windows).
No, Dingbats is not in a script range. Unicode "scripts" refer to language-specific character sets; Latin is a script, Han, Hebrew or Arabic.
jaynavar commentedon Jul 16, 2019
The scaling factor is 100%.
jaynavar commentedon Jul 16, 2019
@BrianInglis I tried adding font linking for Consolas (setting Monaco as the first linked font), and restarted my PC but it didn't fix the issue.
mintty commentedon Jul 17, 2019
This time I can reproduce it at least with one of the sample characters, ❐.
It is rendered wide in mintty 3.0.1. However, the resulting glyph is considerably wider than a character cell; verify this with
echo -e '\u2750x'. The assumedly better appearance in the prompt status line is only due to the fact that they are followed by space there. So this was actually a bug, which mintty 3.0.2 fixed as listed in the change log:So this is a design issue. Proposals are welcome, e.g.:
jaynavar commentedon Jul 18, 2019
Both of those suggestions sound good to me, although the latter won't solve my issue as in one of the places it's used in Git Bash Prompt it is not followed by a space.
That being said, I'm not seeing it take up more space than a single character, so not sure why it would need to be clipped by the current glyph-magic. See these screenshots from Consolas 12pt with v3.0.1:
For now reverting to 3.0.1 fixed the issue for me, thanks @murthyl for the tip!
mintty commentedon Jul 18, 2019
You can see it in @murthyl's second screenshot above. It may vary by character but also with font size and DPI mapping, and maybe also with the font version.
About the prompt, I see a space after every symbol @murthyl's screenshot. If you have another prompt, please send a screen log (or prompt definition).
mintty commentedon Jul 18, 2019
Note that the latter two characters, U+2705 and U+26A1, have the Unicode Wide property (as defined in EastAsianWidth.txt), so lxterminal is actually wrong about them. They are also emojis. With configuration

Emojis=emojione, I get the following appearance (Consolas 14pt, 100% screen) which looks OK for me:17 remaining items
JDNdeveloper commentedon Sep 2, 2019
The current rendering is not ideal for me. I'll stick with 3.0.1 if the current behavior in 3.0.2 onwards is considered "works as designed". Feel free to close the issue if no further work is planned for this.
mintty commentedon Sep 2, 2019
Considering the options that were discussed before, you are welcome to make a design proposal.
JDNdeveloper commentedon Sep 2, 2019
Would it be possible to add a setting to go back to the pre-3.0.2 auto-narrowing behavior for certain unicode blocks like dingbats? I understand that this was fixing an existing bug, however as it seems non-trivial to find a generic "proper" fix for this it would be a surefire way to solve the problem for those of us affected by it.
mintty commentedon Sep 2, 2019
A better solution would be to adjust the scaling from 0.5 to 0.7 or 0.8, maybe configurable if it must,
and maybe even dynamically adapated to the respective glyph width (expect some performance penalty maybe).
JDNdeveloper commentedon Sep 3, 2019
A configurable scaling for certain characters/blocks seems like a good solution. I'm worried about dynamic widths as it doesn't seem to be consistent across devices.
BrianInglis commentedon Sep 4, 2019
Normally if you want to ensure a particular appearance of certain glyphs, you pick a font whose characteristics match those you consider important e.g. I chose DejaVu Sans Mono for my systems, browsers, editors, terminals, to ensure that I could easily distinguish between digits, letters, and punctuation which look more similar in other fonts at smaller sizes.
I think selection of an appropriate (perhaps heavy weight) font is a better approach to ensuring that you get sufficiently heavy HEAVY symbols, rather than adding more
minttyoptions and tweaks for a very narrow requirement, which may have unfortunate effects on the fonts used by the majority of the user base, and increased chances of issues and overheads for everyone.If those glyphs are holes in other fonts you prefer for other purposes, you may configure the fonts with the heavy symbols as fallbacks for the fonts which do not supply those symbols, using Windows font linking, or
fontconfigfont fallback.There are a good number of open source and free fonts from various sources: GNU, Google, SIL, and many other sites, with characteristics matching just about any requirement, and I have never failed to find one which matches specific needs, perhaps with some additional effort required.
Cygwin also has a great selection packaged for easy installation, which you can just drag and drop into
/Windows/Fonts/after install, as I don't believeminttycan usefontconfigfonts:JDNdeveloper commentedon Sep 4, 2019
I prefer to use the Consolas font and don't feel that I should have to change my font in order to avoid squashed symbols. I don't have a particular need for the heavy checkmark to be extremely heavy, I just don't want it to be squashed. I have already tried font fallbacks but it didn't solve the issue.
If there is no solution to this problem without causing negative side effects for others I am happy to stick with 3.0.1, however as @mintty has continued to work on this (thank you!) I feel we'll be able to come up with a solution that works for everyone.
option to adjust automatic character narrowing (#892)
JDNdeveloper commentedon Sep 6, 2019
I've set
CharNarrowing=100and it's rendering the glyphs perfectly! Thank you @mintty!jaynavar commentedon Sep 24, 2019
I just wanted to follow up. I recently installed some new Cygwin packages (not sure the full list due to dependencies), and one of them seems to have messed with the rendering. I'm now seeing the "glyph overlap" that was previously described, and that I had never seen before. Using
CharNarrowing=100shows the glyph as clipped now. Setting toCharNarrowing=50looks better, but still not fully correct. Really not sure what package could be causing this issue.mintty commentedon Sep 26, 2019
Released 3.0.3.
speedup of width detection for auto-narrowing for certain characters (#…
visual double-width of symbols and emojis with subsequent space (#1104,
mintty commentedon Sep 3, 2021
Released 3.5.1.