Hi there!
It seems that the GLK engine allows some undocumented options, as seen here:
viewtopic.php?p=89643
However, looking at https://github.com/scummvm/scummvm/blob ... k/conf.cpp, I can't find an option for antialiased text, and as things are by default, text looks grainy an pretty much ugly.
So, are there low-les fonts I could use? (I take low-res fonts like Amiga's Topaz or similar would make Zork look good).
Or is there an option to apply antialiasing?
GLK engine: Antialiased fonts?
Moderator: ScummVM Team
Re: GLK engine: Antialiased fonts?
I suspect the issue is not so much the antialiasing (which I think is already used in glk) than the resolution at which the text is rendered, by default 640x400. It is first rendered at that scale by the engine, and then scaled by the backend. Ideally for those games we would want to do the text rendering directly at the current screen resolution and not do post-rendering scaling in the backend.
The conf file you point to is the one that defines the width and height to use in the engine, and it looks like you can control that by adding "width" and "height" settings in the scummvm.ini file for the glk games. You may also want to set the graphics and stretch mode to normal/centered to make sure it does not scale the display if your window size does not match exactly the size you set. I would be interested to know if playing with that size indeed improves the text display.
The conf file you point to is the one that defines the width and height to use in the engine, and it looks like you can control that by adding "width" and "height" settings in the scummvm.ini file for the glk games. You may also want to set the graphics and stretch mode to normal/centered to make sure it does not scale the display if your window size does not match exactly the size you set. I would be interested to know if playing with that size indeed improves the text display.
Re: GLK engine: Antialiased fonts?
You're right, sir. If I set stretch mode to center or pixel-perfect, font is not distorted/aliased.criezy wrote: ↑Tue May 24, 2022 1:32 pm I suspect the issue is not so much the antialiasing (which I think is already used in glk) than the resolution at which the text is rendered, by default 640x400. It is first rendered at that scale by the engine, and then scaled by the backend. Ideally for those games we would want to do the text rendering directly at the current screen resolution and not do post-rendering scaling in the backend.
The conf file you point to is the one that defines the width and height to use in the engine, and it looks like you can control that by adding "width" and "height" settings in the scummvm.ini file for the glk games. You may also want to set the graphics and stretch mode to normal/centered to make sure it does not scale the display if your window size does not match exactly the size you set. I would be interested to know if playing with that size indeed improves the text display.
Then I can add with and height values matching my physical video mode sizes (1280x720), and the games look fullscreen too.
The problem is that, as you will surely suspect, text is veeery tiny this way.
I don't see a font size parameter: is there one?
Also, are there background & text color parameters?
EDIT: I found the "monosize" and "propsize" parameters, and they seeem to work! Great!
Now, how can I specify a font, please? This should be very nice with an Atari or Amiga font.
It seems the tfont_* and gfont_* parameters are the way to go, but... what font names can I specify?
- Praetorian
- ScummVM Developer
- Posts: 882
- Joined: Tue May 08, 2007 8:54 am
- Location: Greece
- Contact:
Re: GLK engine: Antialiased fonts?
Currently supported font names seem to be in "engines\glk\screen.cpp"vanfanel wrote: ↑Wed May 25, 2022 3:14 pm EDIT: I found the "monosize" and "propsize" parameters, and they seeem to work! Great!
Now, how can I specify a font, please? This should be very nice with an Atari or Amiga font.
It seems the tfont_* and gfont_* parameters are the way to go, but... what font names can I specify?
Code: Select all
"monor" for "GoMono-Regular.ttf"
"monob" for "GoMono-Bold.ttf"
"monoi" for "GoMono-Italic.ttf"
"monoz" for "GoMono-Bold-Italic.ttf"
"propr" for "NotoSerif-Regular.ttf"
"propb" for "NotoSerif-Bold.ttf"
"propi" for "NotoSerif-Italic.ttf"
"propz" for "NotoSerif-Bold-Italic.ttf"
Code: Select all
[marveladventure2]
engineid=glk
speak=false
bordercolor=F08888
monosize=22
gcolor_0=F44423,001212
speak_input=false
morecolor=F08888
propsize=18
guioptions=sndNoSubs sndNoMusic
linkcolor=FF0011
filename=quest2.dat
tcolor_8=F08888,013377
tcolor_0=FFFFFF,000000
description=Marvel Adventure #2 (English)
path=D:\Games\GLK\ZCODE\AdamsGames\
windowcolor=000000
caretcolor=F08888
gameid=marveladventure2
tfont_0=propz
language=en
- Raziel
- ScummVM Porter
- Posts: 1539
- Joined: Tue Oct 25, 2005 8:27 am
- Location: a dying planet
- Contact:
Re: GLK engine: Antialiased fonts?
I'm following this closely, but tend to lose focus when I get back home from work.
Could someone please write up the steps to achieve this after it was implemented?
Docs maybe...or even better, please add a launcher dialogue option for fonts/background color/size for glk games?!
Thanks s bunch
Could someone please write up the steps to achieve this after it was implemented?
Docs maybe...or even better, please add a launcher dialogue option for fonts/background color/size for glk games?!
Thanks s bunch
-
- Posts: 18
- Joined: Mon Apr 28, 2008 8:41 am
- Location: Gosport, Hampshire
- Contact:
Re: GLK engine: Antialiased fonts?
I can't make head nor tails of those instruction either. Any help would be thankfully recived thanks