Please try this code:
You should see a line of text in Arial font (on Windows systems) that grows larger over a few seconds. If you were to view any single frame on it's own, it would probably look fine, but as an animation it looks horrible because all the letters jiggle up and down as it scales. They appear to be jiggling as if an integer, not floating point y coord is being used for each letter (and they appear to be jiggling independently of each other - not all in sync). I'm not sure if it's doing it in the horizontal direction too, it's hard to tell.
Is this a 3D card/Texture artifact/issue to do with scaling or something that can be improved in the blitz max text handling code? Like a while ago when Skidracer improved the text code so it can draw at floating point coords without distortion.
Note that I've already used SMOOTHFONT and floating point coords throughout my code.
If I was to replace the text with an image, it scales perfectly without any integer jiggling, making me think this is something to do with the way that the text is drawn in BlitzMax when scaled.
Any ideas BRL? Thanks in advance for any feedback.
Strict Graphics 800,600,0 Global Counter# = 0 Global Length# = 60*4 Global MainFont:TImageFont = LoadImageFont("C:\windows\fonts\arial.ttf",40,SMOOTHFONT) SetImageFont MainFont While KeyHit(Key_Escape)=0 'manage counter Counter:+1 If Counter>Length Then Counter:-Length EndIf 'draw the text Cls 'set the scale Local scale# = 1 + Counter/Length SetScale scale,scale SetBlend Alphablend DrawText("Big line of Text",100,100) Flip Wend
You should see a line of text in Arial font (on Windows systems) that grows larger over a few seconds. If you were to view any single frame on it's own, it would probably look fine, but as an animation it looks horrible because all the letters jiggle up and down as it scales. They appear to be jiggling as if an integer, not floating point y coord is being used for each letter (and they appear to be jiggling independently of each other - not all in sync). I'm not sure if it's doing it in the horizontal direction too, it's hard to tell.
Is this a 3D card/Texture artifact/issue to do with scaling or something that can be improved in the blitz max text handling code? Like a while ago when Skidracer improved the text code so it can draw at floating point coords without distortion.
Note that I've already used SMOOTHFONT and floating point coords throughout my code.
If I was to replace the text with an image, it scales perfectly without any integer jiggling, making me think this is something to do with the way that the text is drawn in BlitzMax when scaled.
Any ideas BRL? Thanks in advance for any feedback.