Hello Guest

Author Topic: [SOLVED] No way to get crystal clear fonts :/.  (Read 8799 times)

mamamia

  • Guest
[SOLVED] No way to get crystal clear fonts :/.
« on: November 23, 2012, 11:37:45 pm »
Hi,

Today I started playing with 2dtoolkit font system and I must say I'm a bit upset. On gamemaker I was able to get crystal clear fonts when writing text to scene. It seems it is not possible in 2d toolkit. I always get blurry fonts. I have disabled filtering and used point sampling but it make it worst. Fonts are exported with suggested settings from BMFont and imported on unity3d but again blurry fonts.

The worst is that I have checked the font demo and fonts are blurry too O_O. Am I missing something? Any help will be much apreciated.

Thanks in advance.
« Last Edit: November 24, 2012, 12:36:59 pm by mamamia »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: No way to get crystal clear fonts :/.
« Reply #1 on: November 24, 2012, 12:17:33 am »
You can get pixel perfect fonts.
1. Use tk2dCamera so the font is the right size, and you can position them correctly, easily.
2. Disable mipmaps (important) & use point sampling. If using normal textures, switch to advanced to disable mipmaps.
3. Make sure they are the right size on screen, and they are on a pixel boundary. tk2dCamera really helps here. Use default size, make sure position is a round number.

Most of the demos simply scale to fit the screen and use mipmaps for lower resolution. Obviously that will be blurry. Those scenes are meant to scale to fit whatever resolution

Load demo 11.
Note "Lives" is slightly blurry. This is because its not on a pixel boundary (and it has mipmaps... but we can get it looking better even with mipmaps). Select it, then change position to round numbers. -11, -12.
Yay. Sharp text.

« Last Edit: November 24, 2012, 12:19:58 am by unikron »

mamamia

  • Guest
Re: No way to get crystal clear fonts :/.
« Reply #2 on: November 24, 2012, 12:31:16 pm »
Ok, totally right. Disabling mipmapping did it. Thanks a lot.

On the other hand, isn't it a bit silly to do not deactivate mipmapping for fonts when 2dtk Camera is selected? I mean, if you select this you can be sure you want pixel perfect font. Why not directly disabling the mipmapping? Just a suggestion.

Again, you did it, another problem solved :D. Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: [SOLVED] No way to get crystal clear fonts :/.
« Reply #3 on: November 24, 2012, 01:00:04 pm »
I'm kinda in the middle of a transition to remove the "old" method of importing fonts.
You can now import into sprite collections -
http://unikronsoftware.com/2dtoolkit/doc/tutorial/importing_a_font_into_a_sprite_collection.html

This has mips disabled by default. This is the only path to get font swapping for resolutions too. So eventually the old method will be phased out, probably in 2.0

mamamia

  • Guest
Re: [SOLVED] No way to get crystal clear fonts :/.
« Reply #4 on: November 25, 2012, 03:27:04 pm »
Ok I will move to this right now.

Thanks!.

Evgeniy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: [SOLVED] No way to get crystal clear fonts :/.
« Reply #5 on: December 16, 2012, 12:55:38 pm »
Hi!

I have the same problems. I cann't make a sharp font and I don't understand why. In "Scene window" it seem perfect, but in "Game" window and in my Ipad 2 it looks very fuzzy. If I disable mipmaps it will become very very pointed in "Game" window and in my Ipad 2 it looks very fuzzy.

When I made a font I used BMFont and http://www.unikronsoftware.com/2dtoolkit/doc/tutorial/preparing_a_font.html.





unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile

Evgeniy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: [SOLVED] No way to get crystal clear fonts :/.
« Reply #7 on: December 16, 2012, 03:53:58 pm »
Yes, I have already checked it. There are correct settings. This issue only affects fonts. Other sprites are looked correct.

You can see problem in attached screenshot. It's without mipmaps. A feeling that no half-tones
« Last Edit: December 16, 2012, 04:12:52 pm by Evgeniy »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: [SOLVED] No way to get crystal clear fonts :/.
« Reply #8 on: December 17, 2012, 12:03:25 pm »
Send the .fnt & png/tga over to support@unikronsoftware.com and I'll take a look for you. With those settings it should look correct.