• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE font is distorted.

F

FormalCloud

Guest
Fonts have always been a problem with multi-platform exports because of the way fonts render in any device, you can't always get them perfect by embedding the default font, even monospaced fonts. However, if you make the font from sprites it works MUCH better with scaling.

Custom fonts are the way to go imo.
Read up font_add_sprite and related functions in the manual and it should help you create your own.
 

kingyo

Member
Agreed. At least compare the same thing.
size 10 in GMS is more bigger, more distorted.
Fonts have always been a problem with multi-platform exports because of the way fonts render in any device, you can't always get them perfect by embedding the default font, even monospaced fonts. However, if you make the font from sprites it works MUCH better with scaling.

Custom fonts are the way to go imo.
Read up font_add_sprite and related functions in the manual and it should help you create your own.
Thank you for your addvice!
I know how to make custom fonts. However, there are hundreds, thousands of characters in Japanese. It is very difficult to make it yourself.
 
L

Lonewolff

Guest
Yeah, I find GM's font creation good, but not great.
 

kingyo

Member
have you tried turning on AA in the font properties?
(i think there are a couple font rendering options)
I want expression of 8 bit like pixel font in my game.
I do not use the AA option. Because AA processed fonts are not the ones I want.
 

GMWolf

aka fel666
Edit on that hero thing:
Heiro will not produce a GMS friendly format. You would need a tool that renders a character for each new subimage.

What you can do is in Photoshop, create a strip of characters, then create the sprite from that, with each subimage being a character. (I believe GMS still has sprite strip import features).
You can then use font_add_sprite.
 

kingyo

Member
Edit on that hero thing:
Heiro will not produce a GMS friendly format. You would need a tool that renders a character for each new subimage.

What you can do is in Photoshop, create a strip of characters, then create the sprite from that, with each subimage being a character. (I believe GMS still has sprite strip import features).
You can then use font_add_sprite.
Yes, I know how to make strip of characters and use in GMS.
The number of characters used in the game is at least hundreds of characters long, so it is a tremendously long and steep road.
(There are thousands of characters in Japanese)
 

GMWolf

aka fel666
Yes, I know how to make strip of characters and use in GMS.
The number of characters used in the game is at least hundreds of characters long, so it is a tremendously long and steep road.
(There are thousands of characters in Japanese)
Can you not find a lits of characters and paste them into photoshop?

An issue you may run into is with the texture space a full kanji font will take up.
I would stick with kana and a few common kanji's you expect to use in the game.
At this point its more to do with hardware limits than anything else.
 

kingyo

Member
Can you not find a lits of characters and paste them into photoshop?

An issue you may run into is with the texture space a full kanji font will take up.
I would stick with kana and a few common kanji's you expect to use in the game.
At this point its more to do with hardware limits than anything else.
It's still early in development, so I can not list the letters, but be careful not to run out of texture pages. Thank you.
 
D

Dani

Guest
I'm also having this problem. I would recommend you using monospaced fonts (look for some japanese monospaced font and install it on your OS). These fonts are usually rendered at small sizes with no artifacts and without anti-alias, which is what you're looking for (pixel art looking fonts).

Anyway, GMS2 should revisit the font rendering and font sprite sheet creation engine in order to create small fonts with no anti-alias (crisp) that render ok on screen with no overlapping of characters. At the moment, it's a disaster, and the only option is to manually create fonts with sprites, which is a pain if you want to support many languages.
 

Kyon

Member
Are you drawing this in DRAW GUI?
Because if you aren't, it could also be because of your in-game camera or zooming or anything.
 
D

Dani

Guest
I really don't know why this issue is not a priority. Rendering aliased fonts in GMS2 is not working. The rendering is bad, specially at low sizes.

A visual comparison for you:

gms2-bad-fonts-rendering.png

Just look at the amount of artifacts that are created in the GMS2 version. And those artifacts appear in-game as well, is not just an issue with the font preview window. Any other program renders aliased fonts with no problem. It seems GMS2 is transforming some anti-alias info of each character into visible pixels as well, even if anti-alias is off.

Please, @Mike or someone else, check this issue.

Thanks.
 
I

icuurd12b42

Guest
have you tried disabling true type fonts on your system? that was a huge problem in gm 8 in the past, when it would convert the font to bitmap... it would render the font on the texture page with true type ON... causing edge artefacts
 
D

Dani

Guest
@icuurd12b42 I've tried your advice (I removed all anti-alias options in Windows 10 OS), but GMS2 still renders fonts incorrectly. I really think this problem must be solved in GMS2 itself, since any other software in my computer (image editors, text processing, etc) can render aliased text with no problem, as seen in the sample image I posted.

So, I filed a bug, since I think this is a major issue.
 

rwkay

GameMaker Staff
GameMaker Dev.
I notice that in your picture you have Anti Aliasing option off on the Font Dialog... so the font is being rendered without any anti aliasing... if you want anti aliasing then switch it on.

I may be missing something in what you are saying though.

File a ticket if you have a specific problem

Russell
 

gnysek

Member
I notice that in your picture you have Anti Aliasing option off on the Font Dialog... so the font is being rendered without any anti aliasing... if you want anti aliasing then switch it on.

I may be missing something in what you are saying though.

File a ticket if you have a specific problem

Russell
I think he doesn't want aliasing, but wants to render it same as on pre-WindowsXP era. Or before Paint added AA too.
 
M

Misty

Guest
Edit on that hero thing:
Heiro will not produce a GMS friendly format. You would need a tool that renders a character for each new subimage.

What you can do is in Photoshop, create a strip of characters, then create the sprite from that, with each subimage being a character. (I believe GMS still has sprite strip import features).
You can then use font_add_sprite.
That advice seems a bit vague.

How would you generate a monospaced spritefont from Photoshop automatically?
It seems like you would have to painstakingly align each letter to a grid which would be tedious.
 

GMWolf

aka fel666
That advice seems a bit vague.

How would you generate a monospaced spritefont from Photoshop automatically?
It seems like you would have to painstakingly align each letter to a grid which would be tedious.
What I mean is, use Heiro to produce a grid of characters, then use Photoshop (or whatever) to make it into a single strip.
 
D

Dani

Guest
@rwkay I've already filed a bug report, but it doesn't appear in the recent bugs list, so I'm feeling a bit ignored. And the issue I'm reporting is just the contrary of what you undertood.

GMS2 doesn't render aliased fonts properly, i.e, it doesn't render fonts with anti-alias disabled properly. Just like the sample image I posted, taken directly from the IDE. The issue is quite clear: fonts with anti-alias disabled are rendered with artifacts, they look bad. And this issue doesn't happen in any other image editor of text processing software on my OS (Windows 10).

So, please, take a look at how you're rendering fonts with anti-alias disabled, because it's not working and it's a serious issue for pixel art projects and small fonts, as the original poster pointed out.

Again, the sample image, zoomed in:

gms2-font-rendering.png
 

rwkay

GameMaker Staff
GameMaker Dev.
We use the popular freetype renderer, see - https://www.freetype.org/ currently both IDE and Runner are using version 2.8.0. (we already have a task to update Freetype for a future release)

When rendering a font at low res without anti aliasing then the decision to place a pixel is always somewhat arbitrary when the pixel has to go between pixels (there is no definitive correct answer here, just lots of opinion on this looks correct in this situation (but usually wrong for other situations)) - I am sorry it is not rendering correctly for you.

All the pictures you have posted seem to be from the IDE and I am curious if you are seeing the same results from the Runner (which is the intention, but just curious to see if it is the same).

Russell
 
D

Dani

Guest
@rwkay Yes, this is the main menu of our current project after running the game:

gms2-bad-rendering.png

Arial font, 9 points, anti-alias disabled.

The font rendering is not correct, it shows artifacts. The font rendering in the IDE is exactly as the rendering in-game (in the runner, or via YYC compilation, it doesn't matter). It's not rendering correctly for me, and probably for anyone else. The original poster was talking about this issue as well, but because he used Japanese characters, people seemed to not understand the issue.

You can use this text within the IDE to test the issue yourselves:

Code:
the quick brown fox jumps over the lazy dog
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789ÁÉÍÓÚÀÈÌÒÙÄËÏÖÜÑÃÕÇ
áéíóúàèìòùäëïöüñãõçß.:,;\'`´+-*/_
()¿?¡!’œÂÊÎÔÛâêîôû0123456789

АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФф
ХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя—
There must be some option in Freetype renderer to avoid this issue. I hope.

Thanks.
 
D

Dani

Guest
@rwkay Haven't you found a solution to this issue yet? I updated to the latest GMS2 IDE and Runtime version and the issue is still there: very bad font rendering when anti-aliasing is disabled.
 

rwkay

GameMaker Staff
GameMaker Dev.
No we have not updated Freetype for this version (you can see that in the release notes, it would be mentioned in that). We have higher priority bugs at present and I cannot guarantee when a FreeType upgrade will happen, or even if that will fix your issue.

Your only work around currently would be to either use anti aliasing or to create a sprite font that has the characters that you want and use Photoshop to create that.

Russell
 
Top