Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: xushunwang on June 16, 2014, 09:57:13 PM
-
My game now support two language .
The UILabel in the ui must use different font.And their's fontsize,alignment,position effect are also different.
How can I do to make me easier to adjust different ui usingdifferent language.
-
UILabels have font size specified on them, so if you choose size 20, it will be 20 pixels high, regardless of which font is used. This may mean that some font will be shrunk, and another may be enlarged if they are of different sizes.
To swap fonts easily, consider using a Reference font. Create a game object, put UIFont on it, make it be a Reference type font and point to your actual game font. Save this as a prefab. When making your UI, use this reference font for everything. Then when you want to switch fonts, just replace the font on that prefab you created, and your entire UI will be automatically switched to use the new font.