• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Draw_text_transformed still glitched? Looking for alternatives

S

Silversea

Guest
There has been a strange problem for some time now where using draw_text_transformed causes text to become blurry. Here is an example of draw_text_transformed with no rotation, followed by draw_text below:



Code example:

Code:
draw_set_font(ft_example);
draw_set_color(c_black);
draw_set_halign(fa_left);
draw_text(50,50,"eria"); //text will be standard
draw_text_transformed(50,90,"eria",1,1,0); //text will be blurred

This still happens if:

-High quality is unchecked on the font.
-Anti-aliasing is set to off on the font.
-texture_set_interpolation is set to false.
-The x,y position of the text is rounded to a whole number.
-Other fonts or font sizes are used.

Evidently there is nothing inherently wrong with the code otherwise draw_text would also draw it blurry.

I need a way to draw text at a 90 degree rotation but it becomes very hard to read and inconsistent with the rest of the display thanks to the blurriness of draw_text_transformed. Any ideas? Is there another way to rotate and draw a string?
 
Last edited by a moderator:

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I need a way to draw text at a 90 degree rotation but it becomes very hard to read and inconsistent with the rest of the display thanks to the blurriness of draw_text_transformed. Any ideas? Is there another way to rotate and draw a string?
You can draw text to a surface and then draw that surface. Or use d3d_transform_ (GMS1) or matrix_ (GMS2) functions to temporarily rotate drawn text.
 
S

Silversea

Guest
One of those would probably work yeah. Will have to test them. Might actually be easier to make a complete sprite-based font.

Is there a way to report this as a bug? It doesn't seem to be an intentional feature of draw_text_transformed.
 
P

ph101

Guest
What horizontal justification are you using? Test it with left if you are using centre. I found that centre justification will put on unrounded pixels depending on the string length, even if the x,y is a round number. Instead I left justify, calculate sting left and offset draw position by 0.5 & string length rounded. (gm 1.4)

edit. oh sorry just read your post properly and you are talking about txt transformed - my above problems were with draw_text_ext_colour
 
Top