[Qt-creator] Font Rendering with JetBrains Mono

Henry Skoglund henry at tungware.se
Thu Jan 23 12:30:33 CET 2020


On 2020-01-23 00:08, Alexey Rusakov wrote:
> On Wed, 22 Jan 2020 at 23:06, Michael Jackson 
> <mike.jackson at bluequartz.net <mailto:mike.jackson at bluequartz.net>> wrote:
>
>     So JetBrains released an open-source programmers font they call
>     JetBrains Mono (https://www.jetbrains.com/lp/mono/#intro). Looked
>     interesting so I tried it out. The interesting thing is that
>     inside of QtCreator's editor certain combinations will get
>     substituted with a single glyph. Examples are:
>     [snip...]
>     All of the logic operators will get replaces with a single glyph.
>     What is interesting is that the same code inside of VSCode with
>     the same font will *not* do the substitution.
>
> This finding leads me to believe that VSCode renders code 
> per-character rather than per-line, for whatever reason. Should be 
> suboptimal from performance perspective but who cares about 
> performance of VSCode...
>
>     So is this something specific with the font that QtCreator is
>     detecting that VSCode is not detecting or is there a setting
>     inside of QtCreator that I can toggle to turn *off* the
>     substitutions? I generally like the font but for C++ programming I
>     really need to see the individual characters of my code. I'm
>     attaching images in the hope that they get through that show what
>     I am trying to say.
>
> What you want is to disable ligatures. A quick search brings up, e.g., 
> this piece for ~/.config/fontconfig/fonts.conf (or, for older distros, 
> ~/.fonts.conf): 
> https://wiki.archlinux.org/index.php/Font_configuration/Examples#Disable_ligatures_for_monospaced_fontsĀ (obviously, 
> you will need to replace "Nimbus Mono PS" with "JetBrains Mono"). I 
> have no idea whether Qt Creator uses fontconfig on other platforms - 
> if it does, the same recipe should work there as well.
>
It seems Microsoft is aware of this problem, their answer to JetBrains 
Mono is called Cascadia 
https://github.com/microsoft/cascadia-code/releases and as of November 
last year they're offering 2 flavors, one with ligatures (Cascadia.ttf) 
and one without (CascadiaMono.ttf).
Perhaps JetBrains could be persuaded to do the same, i.e. split their 
Mono font into 2?

Rgrds Henry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20200123/1cbc1c84/attachment.html>


More information about the Qt-creator mailing list