Font issue : artefacts
by natchooo · in Torque Game Builder · 07/28/2009 (9:05 am) · 16 replies
Hello,
i have imported a font from an otf file to an uft file. But when i display this font there sometimes are artefacts next to the characters depending on the size i choose to display them.
Has anyone met this problem too, and please how did you fix it.
Thank you very much for your help in advance.
i have imported a font from an otf file to an uft file. But when i display this font there sometimes are artefacts next to the characters depending on the size i choose to display them.
Has anyone met this problem too, and please how did you fix it.
Thank you very much for your help in advance.
#2
Thanks again.
07/28/2009 (9:24 am)
Thanks i will try to give it a look too when TDN will be up again, and if i do not find, i will post again.Thanks again.
#4
maybe i forgot to mention that the font size i am using is one of those i passed as arguments to populateFontCacheRange() when i built the font.
07/28/2009 (9:49 am)
I used addFontSize() and it does not change a thing :(maybe i forgot to mention that the font size i am using is one of those i passed as arguments to populateFontCacheRange() when i built the font.
#5
screenHeight
The height of the screen to generate the font for (pixels)
cameraHeight
The height of the camera to generate the font for (world space)
characterHeight
The height of the text in world units to generate the size for (world space)
Hopefully that'll work...
If you make them in the levelbuilder first, you can grab the font sizes it thinks are right, too.
If fiddling with those parameters doesn't work, not sure what to do - maybe post a screenshot, might be something else entirely.
Edit...do you have a TGB license?
07/28/2009 (10:04 am)
I remember using addAutoFontSize and getting it to look nice. I think I might have removed all the font sizes and then rebuilt it with custom parameters with that function. I added the units to the parameters, hopefully you can fiddle them to fix it.screenHeight
The height of the screen to generate the font for (pixels)
cameraHeight
The height of the camera to generate the font for (world space)
characterHeight
The height of the text in world units to generate the size for (world space)
Hopefully that'll work...
If you make them in the levelbuilder first, you can grab the font sizes it thinks are right, too.
If fiddling with those parameters doesn't work, not sure what to do - maybe post a screenshot, might be something else entirely.
Edit...do you have a TGB license?
#6
but... how do i post a screenshot ?
i tried using addAutoFontSize and i did not work either :'(
07/28/2009 (10:19 am)
yes i have a licensebut... how do i post a screenshot ?
i tried using addAutoFontSize and i did not work either :'(
#7
Anway, take a screenshot with Ctrl-P or whatever and then post it to imageshack or photobucket or any image hosting site. And then put it here with {image}url{/image} except with [ and ] instead of { and }.
How are you using addAutoFontSize?
07/28/2009 (10:22 am)
You really should post from the account with the license, just so that people don't think you're a pirate.Anway, take a screenshot with Ctrl-P or whatever and then post it to imageshack or photobucket or any image hosting site. And then put it here with {image}url{/image} except with [ and ] instead of { and }.
How are you using addAutoFontSize?
#8
see the small line between the C and the P ? that is the thing that should not be here.
i am using addAutoFontSize(1080, 1080, 32); as my world and camera heights are 1080
07/28/2009 (10:40 am)
Ok next time i will post with the account with the licence (just need to ask my boss the account login/pass ^^ )
see the small line between the C and the P ? that is the thing that should not be here.i am using addAutoFontSize(1080, 1080, 32); as my world and camera heights are 1080
#9
07/28/2009 (10:42 am)
Hmm, yeah. Have you made sure the addAutoFontSize is doing something? What happens if you mess with the values drastically?
#10
by the way thanks for sticking to this thread and helping me :)
07/28/2009 (10:48 am)
Hmmm changing the first 2 params has no effect at all, the 3rd one does change the size of the font though and sometimes removes the artefact, but i need the size to be 32 ; ;by the way thanks for sticking to this thread and helping me :)
#11
Hmm...have you tried seeing if other fonts are generated incorrectly? If you converted this font, does it work correctly in other programs?
Theoretically, you could generate at a larger size, or whatever looks right, and then scale the object itself to whatever you need. That's why this process is so painful.
07/28/2009 (10:50 am)
No prob, I remember this being annoying.Hmm...have you tried seeing if other fonts are generated incorrectly? If you converted this font, does it work correctly in other programs?
Theoretically, you could generate at a larger size, or whatever looks right, and then scale the object itself to whatever you need. That's why this process is so painful.
#12
thanks again.
07/28/2009 (10:56 am)
Ok i will try different things and come back to this thread tomorrow in case i found/did not find something that works.thanks again.
#13
07/28/2009 (10:57 am)
Good luck!
#14
It seems my problem was wolved by using this at the creation of the text object :
fontSizes = "16 18 24 32 36 48 60 64";
lineHeight = 32;
I cannot really explain why choosing just 32 as fontSize would not work but at least i do not see any artefacts anymore, i hope there will not be any with other text objects.
So thank you for your help, and now all i have to do is hope :D
07/28/2009 (3:40 pm)
Hello again, I logged in with the right account this time (I am Natchooo).It seems my problem was wolved by using this at the creation of the text object :
fontSizes = "16 18 24 32 36 48 60 64";
lineHeight = 32;
I cannot really explain why choosing just 32 as fontSize would not work but at least i do not see any artefacts anymore, i hope there will not be any with other text objects.
So thank you for your help, and now all i have to do is hope :D
#15
07/28/2009 (3:51 pm)
Great, glad you got it working. It's definitely a bit wonky and hopefully will get some love in T2D.
#16
Changing the font itself is not a possibility at the moment, and it works correctly on other programs.
So please if you have any idea what could help, let me know... again ;)
Thanks.
08/26/2009 (6:29 am)
Argh, I changed the lineHeight attribute to 48 and the artefacts are back. I tried using addAutoFontSize() but even though it returned 1, the font is still messed up with those artefacts.Changing the font itself is not a possibility at the moment, and it works correctly on other programs.
So please if you have any idea what could help, let me know... again ;)
Thanks.
Associate Tom Eastman (Eastbeast314)
There's definitely a function that helps - if you can't find it in the docs, post back here and I'll give it a look :)
I know that doesn't really help, but hopefully it'll get you on the right path until someone who's used TGB recently can help ;)