Hello. I just spent 5 minutes trying to figure out why my code wasn't working. Turned out there was a letter l in the middle of the numbers.
Is there's a way to change the default code font? If not, could that be possible to add, or is it too complicated?
Or maybe, if the font is embedded during compilation, we could switch to a more readable font?
Here's the same in SublimeText:
[FIXED] Possibility to change ZGE default font?
Moderator: Moderators
[FIXED] Possibility to change ZGE default font?
Last edited by Ats on Wed Apr 17, 2024 11:13 am, edited 1 time in total.
Re: Possibility to change ZGE default font?
Today I tried replacing the editor font by another.
After a quick search "font.name" in the ZGameEditor project, the fonts used are:
I even tried to put Tahoma everywhere, but the editor font is still different: .
So where does the magic happen to set the editor's font?
I would like to try replacing it by the fonts used in Sublime Text:
Windows: Consolas 10 pt.
Linux: Monospace 10 pt. (the exact monospace font used may vary on different Linux distributions or versions)
OS X: Menlo Regular 12 pt.
After a quick search "font.name" in the ZGameEditor project, the fonts used are:
- 'Tahoma': most of the program
- 'MS Sans Serif': text editors, maybe?
- 'Courier New': a lone wolf that only appears in zgameeditor\tools\ZDesigner\3rdparty\SynEditMiscClasses.pas
I even tried to put Tahoma everywhere, but the editor font is still different: .
So where does the magic happen to set the editor's font?
I would like to try replacing it by the fonts used in Sublime Text:
Windows: Consolas 10 pt.
Linux: Monospace 10 pt. (the exact monospace font used may vary on different Linux distributions or versions)
OS X: Menlo Regular 12 pt.
Re: Possibility to change ZGE default font?
Hi Ats,
K
ZGameEditor uses the SynEdit component for code editing and doesn't set any specific font ( so the default is used ). Apparently you can set a custom font using the SetFont procedure. Should be pretty straight-forward to add a CodeEditorFont entry ( alongside CodeEditorFontSize ) in the configuration file so ZGE users can easily configure this themselves.
K
Re: Possibility to change ZGE default font?
Please try this. Download ZGE again, I just updated it.
Open ZGameEditor.ini
In the Designer-section, add
"CodeEditorFontName=the name of your font"
For instance: CodeEditorFontName=Webdings
Save the file.
Open ZGE and see if it worked.
Open ZGameEditor.ini
In the Designer-section, add
"CodeEditorFontName=the name of your font"
For instance: CodeEditorFontName=Webdings
Save the file.
Open ZGE and see if it worked.
Re: Possibility to change ZGE default font?
Thanks VilleK, it's working perfectly and the font Consolas makes the code very nice to look at