Author Topic: Getting nice small text, possible?  (Read 2801 times)

alfredduler

  • Guest
Getting nice small text, possible?
« on: August 27, 2013, 11:27:38 AM »
Hey everybody,

Long story short, I need to display tiny Labels. Problem is I can't reach to a nice render.

ScreenShots atached.

Well, obviously the first one is made with Unity GUI, and the second one with NGUI Label.

I used Dynamic Font.

Any suggestion to make it more like the Unity GUI one?

Thanks in advance!

Alfred

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Getting nice small text, possible?
« Reply #1 on: August 27, 2013, 12:09:35 PM »
Looks to me like you are using a bitmap font, and that you have your glyphs be white on a black background. You need the RGB channel to be pure white instead. Furthermore make sure that the label is pixel-perfect.

alfredduler

  • Guest
Re: Getting nice small text, possible?
« Reply #2 on: August 27, 2013, 12:53:44 PM »
Thanks for your answer.

But like I said, I didn't use Atlases but Dynamic Font. Do you think atlases with RGB Channel could bring a better result?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Getting nice small text, possible?
« Reply #3 on: August 27, 2013, 12:55:49 PM »
Oh I missed that part. Not sure then. Small arial font looks just fine to me using dynamic fonts. Are you sure your hierarchy is pixel-perfect?

alfredduler

  • Guest
Re: Getting nice small text, possible?
« Reply #4 on: August 29, 2013, 05:52:43 AM »
Thanks for your answer and sorry for the time I took to respond.

Well I managed to make it work.

To answer your question, yes my hierarchy was Pixel Perfect.

Fact is that I have to play with the font size. In fact, before this post I tried with Arial font and the result was quite good, so I tried with the font I wanted but keeping the same font size that I used with Arial. Which was the error. To get a proper result I needed to make it smaller.

Anyway, thanks for your support, very apreciated.

Regards

OnlineCop

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Re: Getting nice small text, possible?
« Reply #5 on: August 29, 2013, 11:38:01 AM »
This may be a little late to the game, but I wanted to show off some things we've discovered in our tests:

We imported the same font in various scales (18, 21, 24, 28, and 36-points). In the top-left corner of this image, we show them at their "native" resolutions (the same scale that they were imported into Unity/NGUI with).

In the top-right corner, we've taken the 18-point font and scaled it up all the way to 36-point. As you can see, it gets blurry.

In the bottom, we started with the 36-point font and scaled it down. In my opinion (but I'm no artist), it looks even crisper than the "native" import. Of course, the texture is just that much bigger in memory.

So if you're okay with a little more of a memory footprint, I'd suggest importing it as large as you expect you'll ever see it in your app, and just downscale it. After all, if you reuse the same font (just different scales) all over the place, it's optimized enough that it's only using a single texture for all those various draw calls.

alfredduler

  • Guest
Re: Getting nice small text, possible?
« Reply #6 on: August 29, 2013, 11:45:20 AM »
Thanks for the tests. I keep that in mind and will refer to it if I got in trouble again!