[Qt-creator] Font Rendering with JetBrains Mono
Alexey Rusakov
ktirf at users.sf.net
Thu Jan 23 00:08:43 CET 2020
On Wed, 22 Jan 2020 at 23:06, Michael Jackson <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.
--
Alexey Rusakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20200123/fa669580/attachment.html>
More information about the Qt-creator
mailing list