godot
godot copied to clipboard
Syntax highlighting not working in text editor on Windows 10/Godot 4 alpha 9
Godot version
v4.0.alpha9.official [fc18891db]
System information
Windows 10
Issue description
There is no syntax highlighting/coloring in the text editor at all. In alpha 8 the highlighting works as expected, but the same project in alpha 9 shows as plain text, as does a new project created in alpha 9. Changing the syntax highlighting mode in the settings does not have any effect, nor does changing the colors or theme. Syntax highlighting does seem to work in the "minimap" panel on the right.
Steps to reproduce
Open a file in the text editor which should have syntax highlighting enabled.
Minimal reproduction project
No response
Is it for all projects, or just one (can you upload a MRP)? It's working fine for me on Win11:
Here's an MRP. Opening this in a9 has no highlighting, but opening it in a8 does have highlighting. This was an issue from the first time running a9 so I haven't changed any settings at all as far as I'm aware.
I can't reproduce on my laptop (this is what the MRP looks like for me):
I just upgraded a few different laptops to 3.5 last night, and one of them (an old Sony Vaio) exhibits this same issue. No syntax highlighting in the main editor, but working in the mini-map. The same project highlights as expected in 3.4.4 on the offending system. Also, a brand new project, started in 3.5 shows no syntax highlighting.
Toggling highlighting on/off in the Editor settings changes the highlighting in the mini-map (as expected), but has no impact on the main editor.
The offending project highlights correctly on the other (upgraded to 3.5) laptop. So, it's seemingly hardware related.
@mackenziedg @jgodfrey Which graphics card model and driver version are you using on the machine exhibiting the problem?
@Calinou - Here's the Speccy info on this (ancient) Vaio laptop's GPU. Unfortunately, this is the latest, newest video driver for this system. It's mostly relegated to web browsing at this point, but Godot has always worked well on it, so I've continued to use it from time to time... :)
Same problem here in v3.5.stable.official [991bb6ac7] on Windows 11. Video drivers are up to date. Video card: NVIDIA GeForce GTX 1060 6GB Driver version: 31.0.15.1694
It may be related to custom fonts. Works again for me after resetting to default editor font.
Ah, yes. Nice find @TheKiwy. Resetting the Code Font
to the default value fixes the syntax highlighting here also. Though, I'd really prefer to use a custom font... :)
One more update here in case it's helpful...
In my case, the offending hardware (outlined above) is currently running Windows 10 and Godot v3.5.stable.official. My normal coding font is SourceCodePro
, which results in this issue (no syntax highlighting). However, I recently switched to using JetBrainsMono
for my coding font, which DOES NOT exhibit this issue. With that font, the syntax highlighting works as expected.
I did notice that my SourceCodePro
font is an OTF
file while my JetBrainsMono
font is a TTF
file. As a test, I found a TTF
version fo SourceCodePro
, but it also does not show any syntax highlighting.
So, at least for me, only some custom fonts cause this issue. Incidentally, syntax highlighting works as expected in v3.4.4 using SourceCodePro
.
I just had this issue as well in the stable 4.0 mono release. But changing the font antialiasing in interface/editor/font_antialiasing back to the default (grayscale) fixed it for me.
Can any of you who can reproduce this try to bisect the regression between 4.0.alpha8 and 4.0.alpha9?
- 4.0.alpha8 (
good
)'s commit hash is917fd65748957304c987414c63d54ef4f6972394
. - 4.0.alpha8 (
bad
)'s commit hash isd9daf3869f27e2afdacb2744168052ce0d4ae43b
.