Using a system font in GM:S slices off edge

P

ph101

Guest
Hiya

I'm experimenting using some fonts I have installed on my system (windows 7) in GM:S. What I'm finding is that GM:S seems to cut of the end of the certain letters, namely the digit 0 (zero). It happens on all fonts, whether I have installed them from an OTS or if they are default on the system such as Arial, also in smaller or larger sizes, and whether you selected anti aliasing when using the font create box.

Basically I'm looking for a way to alter the space between letters, however, I can only see ways to do that when you have created your own font via a sprite file (which I have done, but I'm wanting to use a better looking one) and setting to proprtional or not, I can't see anyway to fix this..

Has anyone else experienced that?

edit. so letters seem fine but digits such as 9 and 0 on the far right a couple of pixels are sliced off.

Thanks.
 
Last edited by a moderator:
R

RealityShifter

Guest
I'd clear your cache and try compiling again, but also try adjusting the font size in game maker. I noticed that say font size 17 might look crappy and distorted but font size 18 would look great. Try playing around will all the settings.
 
P

ph101

Guest
Thanks, but it's not a cache issue. If you test arial font imported with GM:S resource, the right few pixels of 9 and 0 clip, everytime. I get it with every font I try between reboots. Has anyone had success with making a font resource from a system font through GM:S gui, and then having a 0 or 9 not clip?

edit. Been testing a bit more. I think it may be having issues with my GUI layer not scaling correctly, it's possibly the cause.

edit2. Actually it seems it is to do with draw_set_halign(fa_center); - is not drawing the font on a rounded pixal value potentially.

edit3. To confirm that if I left justify - draw_set_halign(fa_left) - at a round(x),round(y) positon I have no issues. If I use center, the text is not necessarily drawn on a round pixel, which means depending on how you are scaling and using resolutions, its going to distort your font. This doesn't appear to be an issue with fonts created using font_add_sprite_ext, although perhaps I just missed then. Hope it helps someone else.
 
Last edited by a moderator:
Top