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
Mintty incompatible with Nerd-Fonts or Font-Awesome yet. #638
I tried to remove all the font with different abnormal glyphs in Fontforge, but even if I simply open a compatible font in Fontforge and I save it as is, it become not compatible with mintty.
Windows command.exe also doesn't support such fonts, but VisualStudio or any other IDE do.
Would it be possible for mintty to support that kind of fonts?
Mintty supports all fonts and works with this font: mintty -o Font="SauceCodePro NF"
However, the font chooser dialog lists only fonts that are known to the system as monospace font. You may check whether that is handled properly with Fontforge.
For me, after installing the font you linked to, mintty -o Font="SauceCodePro NF" works. Maybe, since you work on fonts with Fontforge, you have versions installed under multiple names?
The Nerd Fonts projects could define a set of code points/ranges considered “wide” (an obstacle being their own font-patcher option --use-single-width-glyphs) and a corresponding mintty option similar to the current “Indice wide” feature.
Mintty could add a generic feature to define specific character ranges as “wide” (i.e. double-cell width), probably again dynamically with control sequences.
After playing around for few days, I realized that SauceCodePro doesn't play well with italic, but it is not often the case:
This is perhaps not related to Nerd Fonts at all.
Regarding your remark I don't really understand what would be the problem to extend a character a bit if it's larger than a standard monospace character even though it would mask the character low it. I think those who will use such icons have to put enough spaces after it:
The clipping of italics is a consequence of the nature of fixed-cell-width terminals. It's strange though that is does not happen always in your screenshot, and I don't reproduce it with "SauceCodePro NF". Please provide your config (esp font size, maybe shortened config file) and sample text.
Clipping within italic text could be avoided by rendering the text from right to left (perhaps slowing down a bit), maybe I'll check that.
About wide glyphs (like icons), if the request is not to reserve extra space to them (as would be needed for sequences of wider characters like in #553) or even to display everything at proportional width (#538, which very few terminals have ever tried to implement), it should be possible to allow a hangover for them.
But note that this would require that no output to the right neighbour cell is written; also, mintty would need to introduce a distinction between empty cells and space cells, which may turn out to be hard, don't know. Which other terminals support this?
As you suspected I was using another Nerd Font which is called "SauceCodePro Nerd Font". I replaced it with the link I provided and this time I don't have any issues with the italic, but the font looks quite ugly compared to the previous one. One other point is that the glyphs are not deformed anymore.
Unfortunately I forgot to backup what was in my C:\Windows\Fonts folder before removing every SauceCodePro. I have to see if I still have the buggy version at home.
However I tested with DejaVuSansMono NF with which I have the buggy effect on italic, plus the shrank glyphs:
I have to revise my previous statement about mintty not squeezing characters. It does in fact have such a mechanism, which was intended for single-width letters (according to the current locale metrics) of double-width glyphs (from certain East Asian fonts), e.g. "œ". This means the mechanism is desirable and useful and cannot be just dropped; as said before, reasonable criteria for different handling need to be identified.
Also, even changing the behaviour isn't quite as straight-forward; double-width icons are arbitrarily getting clipped when scrolling the screen. Some analysis is needed.
Please provide reproducible input on how to generate the screenshots from #638 (comment) and the last one (with the italics). Which terminal and programs were used? Make a screen log please (not screen shot).
No, I don't, no italics following your instructions. And what's vim8?
Instead of instructions how to create this picture you could also provide a screen log (with mintty --log or script from the util-linux package).
Released some improvements in 2.7.5, please check.
Full overhang enabling for italics would be more fiddly however. Not yet sure whether it's worth the effort.
Activity
mintty commentedon Mar 3, 2017
Mintty supports all fonts and works with this font:
mintty -o Font="SauceCodePro NF"However, the font chooser dialog lists only fonts that are known to the system as monospace font. You may check whether that is handled properly with Fontforge.
nowox commentedon Mar 3, 2017
Woot!
I put this in my
minttyshortcut and it works:I must note that I first tried with the wrong name
mintty -o Font="SauceCodePro NF"and I did not get any error message.mintty commentedon Mar 3, 2017
For me, after installing the font you linked to,
mintty -o Font="SauceCodePro NF"works. Maybe, since you work on fonts with Fontforge, you have versions installed under multiple names?nowox commentedon Mar 3, 2017
I exactly used the font I linked and it didn't work. However the other issue I have is the dimension of the icons that looks a bit squeezed: https://ibb.co/dkdCBF
It seems mintty consider the used font as monospace and resize all glyphs to fit in the allowed size. Would it be possible to look like this: https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.8.x/overall-screenshot.png
mintty commentedon Mar 3, 2017
Mintty expands certain characters if appropriate, by a factor of two, but it does not squeeze characters to cell width (although I'm considering to do that in order to conciliate #615).
In the screenshot, these icons seem to be displayed at double-cell width. Mintty could in theory do that and in fact there is such an experimental option already (https://github.com/mintty/mintty/wiki/CtrlSeqs#wide-characters) but there are two problems:
mintty commentedon Mar 6, 2017
Code points used by “Nerd Fonts” (https://github.com/ryanoasis/nerd-fonts#glyph-sets) are in the Unicode Private Use area which means there is no “official” reference defining their properties. I see 2 options to achieve support for extended wide character handling:
nowox commentedon Mar 7, 2017
After playing around for few days, I realized that
SauceCodeProdoesn't play well with italic, but it is not often the case:This is perhaps not related to Nerd Fonts at all.
Regarding your remark I don't really understand what would be the problem to extend a character a bit if it's larger than a standard monospace character even though it would mask the character low it. I think those who will use such icons have to put enough spaces after it:
So I think your second proposition is a good one.
mintty commentedon Mar 7, 2017
The clipping of italics is a consequence of the nature of fixed-cell-width terminals. It's strange though that is does not happen always in your screenshot, and I don't reproduce it with "SauceCodePro NF". Please provide your config (esp font size, maybe shortened config file) and sample text.
Clipping within italic text could be avoided by rendering the text from right to left (perhaps slowing down a bit), maybe I'll check that.
About wide glyphs (like icons), if the request is not to reserve extra space to them (as would be needed for sequences of wider characters like in #553) or even to display everything at proportional width (#538, which very few terminals have ever tried to implement), it should be possible to allow a hangover for them.
But note that this would require that no output to the right neighbour cell is written; also, mintty would need to introduce a distinction between empty cells and space cells, which may turn out to be hard, don't know. Which other terminals support this?
nowox commentedon Mar 7, 2017
As you suspected I was using another Nerd Font which is called "SauceCodePro Nerd Font". I replaced it with the link I provided and this time I don't have any issues with the italic, but the font looks quite ugly compared to the previous one. One other point is that the glyphs are not deformed anymore.
Unfortunately I forgot to backup what was in my
C:\Windows\Fontsfolder before removing everySauceCodePro. I have to see if I still have the buggy version at home.However I tested with DejaVuSansMono NF with which I have the buggy effect on italic, plus the shrank glyphs:
mintty commentedon Mar 7, 2017
I cannot reproduce the occasionally clipped "V". Please provide a test case.
mintty commentedon Mar 7, 2017
I have to revise my previous statement about mintty not squeezing characters. It does in fact have such a mechanism, which was intended for single-width letters (according to the current locale metrics) of double-width glyphs (from certain East Asian fonts), e.g. "œ". This means the mechanism is desirable and useful and cannot be just dropped; as said before, reasonable criteria for different handling need to be identified.
Also, even changing the behaviour isn't quite as straight-forward; double-width icons are arbitrarily getting clipped when scrolling the screen. Some analysis is needed.
mintty commentedon Mar 9, 2017
Please provide reproducible input on how to generate the screenshots from #638 (comment) and the last one (with the italics). Which terminal and programs were used? Make a screen log please (not screen shot).
nowox commentedon Mar 9, 2017
Then in
vim8:You should get this:
mintty commentedon Mar 9, 2017
No, I don't, no italics following your instructions. And what's vim8?
Instead of instructions how to create this picture you could also provide a screen log (with mintty --log or
scriptfrom the util-linux package).nowox commentedon Mar 9, 2017
Sorry about that
vim8is simplyvimversion 8:And here is the log:
https://gist.github.com/nowox/c07ed5d1d94d0e62634156736fb1217d
With this I get this:
I can also reproduce it without vim:
And the log is this:
6 remaining items
mintty commentedon Mar 11, 2017
Released some improvements in 2.7.5, please check.
Full overhang enabling for italics would be more fiddly however. Not yet sure whether it's worth the effort.
nowox commentedon Mar 13, 2017
Nice improvements, thanks for your time. It is good to mention that only monospace fonts are listed.
Regarding italics, the latest version on the master branch doesn't solve the issue on vim with
set cursorcolumnon and this font enabled:This is not a real issue for me since I am not using this font. And again this is another issue out of topic.
So thanks anyway.
support cell overhang of italics (#418, #152, #638)
mintty commentedon Mar 16, 2017
In any case, it was a challenge. Now supported.
mintty commentedon Apr 13, 2017
Released 2.7.6.
restrict glyph width scaling (mintty#638)
tweak italic overhang clipping (mintty#638)
note that only monospace fonts are listed (mintty/wsltty#29, mintty#638)
support cell overhang of italics (mintty#418, mintty#152, mintty#638)
tweak width expansion of ambiguous-width characters (#680, ~#638, ~#615)
mintty commentedon Oct 23, 2017
Released 2.8.0.
character attribute to enforce single/double width (#615, #979, #938, #…
mintty commentedon May 20, 2020
Released 3.1.5 with explicit character width attribute support.
visual double-width of symbols and emojis with subsequent space (#1104,