Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: broken on November 01, 2013, 04:31:30 AM

Title: UILabel font size and ClampContent
Post by: broken on November 01, 2013, 04:31:30 AM
Hi!

I use UIInput (with BitmapFonts) for my chat input. In design (photoshop) font size = 12. If i do export font (BMFont) with a similar size, it looks very bad inside Unity.
So I make export a big font size (eg 36).
For chat input i set UILabel to ClampContent (for long strings). But after I reduce the size (height dimension) of the label from 36 to eg 16, label disappears.
What should I do? How to make a small font with good quality? Is very different from the font design in Photoshop.
I have a tool ShoeBox, but it has no kerning pairs for cyrillic  :(

Thanks!
Title: Re: UILabel font size and ClampContent
Post by: ArenMook on November 01, 2013, 06:02:56 AM
Clamp means just that -- clamp it. If it doesn't fit, remove it.

Shrink is what you want.
Title: Re: UILabel font size and ClampContent
Post by: broken on November 02, 2013, 07:01:00 AM
Clamp means just that -- clamp it. If it doesn't fit, remove it.

Shrink is what you want.

But I need to carriage was always visible, even if the input string does not fit in the control (like in your Chat example, there is Clamp Content).
And when I present the Shrink (or Clamp), when UIInput is selected the option Encoding (use emoticons ...) for UILabel automatically removed from the label (I need to use emoticons), what is that?.
Title: Re: UILabel font size and ClampContent
Post by: ArenMook on November 02, 2013, 08:06:50 AM
Input field text can't support symbols and color encoding. It has always been like that.
Title: Re: UILabel font size and ClampContent
Post by: broken on November 03, 2013, 07:05:33 AM
Input field text can't support symbols and color encoding. It has always been like that.

Why is there such a restriction?
Title: Re: UILabel font size and ClampContent
Post by: ArenMook on November 03, 2013, 09:06:56 AM
Because players embedding colors in the stuff they type is undesirable at best.
Title: Re: UILabel font size and ClampContent
Post by: broken on November 03, 2013, 01:28:58 PM
Because players embedding colors in the stuff they type is undesirable at best.
Then why not share option into two parts - a separate color and smiles separately. For example, when you type text on Skype and want to add a smiley, if you write by hand smile he displayed as text in the input line, and if you choose from the drop down list, then it is inserted as a string as a picture. May make a separate tag [smile] [-] and then the text would be interpreted as a picture, or else as text?
For chat inputs sometimes it's good when emoticons are displayed in the input line, at least not right away but after a certain box in Skype
Title: Re: UILabel font size and ClampContent
Post by: broken on November 05, 2013, 10:13:58 AM
So what do you think about this?
Title: Re: UILabel font size and ClampContent
Post by: ArenMook on November 05, 2013, 12:14:27 PM
Right now? Nothing. Too busy... In the future, may make sense.
Title: Re: UILabel font size and ClampContent
Post by: broken on November 05, 2013, 01:08:51 PM
Okay ;)
Title: Re: UILabel font size and ClampContent
Post by: broken on November 06, 2013, 12:08:49 AM
Hi!
I did not create a new topic, noticed:

1. Open Chat Example.
2. Input string: "123123123]"
3. What you see on the output: "12"

I think it should not be.

Previously, I created a topic about creating separate tags for emoticons.
For example may be a situation:
I have emoticons with sequences "]:)" and ":["
Eg text: "hello my phone number :[123123]:)" will be interpreted incorrectly. Of course, you can format the text you type after sending.
Title: Re: UILabel font size and ClampContent
Post by: ArenMook on November 06, 2013, 07:30:50 AM
Confirmed, thanks. I've fixed it in the repository, so you will see the fix in the next update.
Title: Re: UILabel font size and ClampContent
Post by: broken on November 06, 2013, 07:49:06 AM
Confirmed, thanks. I've fixed it in the repository, so you will see the fix in the next update.

I do my little chat for the game, and how many had to dig in NGUI (UIInput, UILabel, ScrollBars, Clipped Panels etc) :)