Why does this happen? (fonts)
BlitzMax Forums/BlitzMax Programming/Why does this happen? (fonts)
| ||
Running the code below, use Q and A keys to change the width of the font. When the font gets down to a certain width, it's vertical resolution jumps from normal to bloktastic. Is this a bug?Graphics 800,600,32,60 font:TimageFont=LoadImageFont("Jedi Normal.ttf",48) SetImageFont(font) SetBlend ALPHABLEND sx#=1.0 Repeat Cls If KeyDown(KEY_Q) sx:+0.001 If KeyDown(KEY_A) sx:-0.001 SetScale sx,1.0 DrawText "hellooOO!!",100,100 Flip Until KeyHit(KEY_ESCAPE) The font I was using... <EDIT> Last link wasn't a free one. This is... www.searchfreefonts.com/fonts/j7.htm It's the top font on the page. |
| ||
try insert this code for complete testing font load:font:TimageFont=LoadImageFont("Jedi Normal.ttf",48) if font = 0 Notify "font not load" end endif solution: have to use full path to font as "C:\MyProjects\Media\Jedi Normal.ttf" |
| ||
Thanks, Vlad, but that's no the problem. The font loads fine... stick that mod in if you need it to get things working your end. Do you not see the problem I mention in my first post? |
| ||
I do not have that Jedi font, but with the standard system font, when I held down the a key, the word eventually ended up being printed backwards, I guess sx went negative. The font never jumped to bloktastic, whatever that means. What does bloktastic mean? |
| ||
HAve you tried loading it with the smoothing flag? |
| ||
Hi guys. What I mean by blocktastic: Suddenly jumps to a vertical resolution of about 8 pixels instead of the 48 I loaded it at. The horizontal resolution seems un-affected. This is whilst sx is still >0. I would really appreciate if someone could repeat with the same font (the link's in my original post), and see if they get the same effect. Grey: Yeah tried the smoothing flag.. same result. SMOOTHFONT is the default anyways according to the docs, but they could be wrong. |
| ||
That link takes me to a page to buy the font. No free download that I can see. Sorry, I am not going to buy that font. :) |
| ||
Sorry mate... I already had the font just found a quick link for it. I didn't realise it was a paid one... it even says FREE in the URL! I promise this was not some confidence skam to get a few pennies out of my fellow Blitzers! This one is free.. http://www.searchfreefonts.com/fonts/j7.htm It's the top one on the page. |
| ||
OK, got your font and ran it. I still did not see any crazy change in the vertical size of the font. I am running WinXP if that maybe matters some how... Editted: No change in vertical size at all... |
| ||
Thanks for that, TaskMaster. Just to clarify, the font doesn't get smaller vertically. It just goes blocky in the vertical plane. I guess this doesn't change your answer, so it's something specific to my setup. I'm on XP too. |