Text display issue in Visual Studio Code in Kubuntu 16.04? Change the font!

After upgrading Kubuntu from 15.10 to 16.04, the text really looked ugly: it was darker (even when my theme specified « #ffffff ») and looked imprecise.

In fact, the reason was the default font which was now « Courier New ». The solution, which had nothing to do with the text color (!), was to modify the configuration file (menu File / Preferences / User Settings) by adding an entry like:

"editor.fontFamily": "Liberation Mono"
"editor.fontFamily": "Oxygen Mono"

I struggled to find why it only impacted Kubuntu 16.04 (either KDE and XFCE), and not Ubuntu 16.04 (on Unity) or Ubuntu 15.10 (on KDE): using some VMs I compared (with « strace ») the files loaded by vscode, without any success: it seemed that the files were the same, including the GTK 2 themes.

In fact, I could have found more quickly by using the vscode (Chromium) dev tools (unlock them in the Help menu and press F12): I would have seen which was the font actually used by the editor.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *