- Home /
              This question was 
             closed May 27, 2013 at 03:48 AM by 
             sona.viswam for the following reason: 
             
 
            The question is answered, right answer was accepted
 
               Question by 
               sona.viswam · Dec 27, 2012 at 04:09 AM · 
                stringfont  
              
 
              Font issue in unity 3d
Hi I imported a font and using it in GUISkin for buttons. But I am getting a warning
 Font size and style overrides are only supported for dynamic fonts.
 UnityEngine.GUI:Button(Rect, String)
How to escape from this?
How can i make font in all devices with different font sizes
Thanks in Advance
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by paulaceccon · Dec 27, 2012 at 02:25 PM
Are you building for Android/iOS? If so, this devices don't support dynamic fonts. Take a look at this:
http://answers.unity3d.com/questions/236207/font-size-and-style-overrides-are-only-supported-f.html
Answer by sona.viswam · May 23, 2013 at 11:58 AM
 private float guiDiff;
 
 public GUIStyle scoreStyle;
 
 // in start function
 
 guiDiff = screenResolution.x / 480f;  (480 is my testing equipment width)
 
 scoreStyle.fontSize = Mathf.CeilToInt(15 * guiDiff);
Its works fine for me in all device.
Answer by Ashish Dwivedi · May 23, 2013 at 12:26 PM
I am using this method. This will scale font according to different devices and works fine.

 
                 
                screen shot 2013-05-23 at 5.52.20 pm.png 
                (25.9 kB) 
               
 
               koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                