Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Nubeh on August 20, 2014, 03:00:39 AM
-
I have 3 labels with a fixed width and height where I change the text (always one word only) dynamically. Because I don't know the length of the word beforehand I set the label to ShrinkContent. The problem now is that when a word in label 1 is short and the one in label 2 is long then the dimensions of the font for the two labels is different.
Is there a way to set the smallest font size among all 3 labels so that the text inside them looks all the same size?
Thanks
-
You can set the font size on the label itself. Change it to your desired font size. There is no "min" value with shrink to fit.
-
the problem with using a fixed font size is that I don't know anything about the length of the text coming from the server (also because I have translations so a short word in English can become a long word in Italian, German or French). In my GUI I want to allow only for a maximum width of the text so that it doesn't overlap with other gui elements. That's why I wanted to let the text shrink and then use the minimum font among the labels.