TTF font is poor quality
#1 Members - Reputation: 161
Posted 05 November 2012 - 04:02 PM
See screen shot for the font output:
http://213.175.192.158/~civilian/img.jpg
I have this as my code:
[source lang="cpp"] TTF_Font *font = NULL; SDL_Color textColor = { 248, 248, 255 }; font = TTF_OpenFont( "font.ttf", 16 ); if(!font) { printf("TTF_OpenFont: %s\n", TTF_GetError()); exit(0); } SDL_Surface* message = TTF_RenderText_Blended( font, caption.c_str(), textColor );[/source]
I don't know how to fix the issue, any ideas?
#2 Members - Reputation: 645
Posted 05 November 2012 - 04:40 PM
Is the font clear around edges? or is it fuzzy around edges / blur ?
If u don't have program to open .ttf files, press "Start" in search bar type "fonts" hit enter
copy your font there and open it from there, and then check how it looks like.
Hope it helps!
Current projects:
The Wanderer, 2d turn based rpg style game
www.gamedev.net/topic/641117-check-up-the-wanderer/
#4 Members - Reputation: 277
Posted 05 November 2012 - 08:18 PM
As a note, I don't see any 'pixelation' in your screenshot aside from the jpeg compression artifacts, so I'm unsure of what issue you're actually describing. Do you mean the distorted outlines? Because that's not pixelation, that's distortion, and that can be explained by my previous statement.
Try using a different font, perhaps a default Windows font, to see if you get different results. If you do, you know you have a font file that may have issues or may be causing issues with FT2.
Edited by leeor_net, 05 November 2012 - 08:19 PM.
-The Legend of Mazzeroth-Project Lead, Lead Software Architect & Engineer, General Tasks and Professional Chef.http://www.newagesoftware.org
#5 Members - Reputation: 645
Posted 06 November 2012 - 11:22 AM
Its the same quality regardless of size i put in the script.
The file and the font itself is crystal clear quality ... observe:
I check the font and image... that's the font you are using since all letters match but Q is so weird...
On the other hand does your string have ' '(white spaces) , if it does try removing them and see what result you get.
Also try moving the drawing position of the font left or right 1 pixel and repeat for up down.
And if that does not help, gimme the source code. I did SDL for some time now and i had issues like this before.
Edited by BaneTrapper, 06 November 2012 - 11:25 AM.
Current projects:
The Wanderer, 2d turn based rpg style game
www.gamedev.net/topic/641117-check-up-the-wanderer/






