Search Unity

Problem to set fontNames with project included fonts

Discussion in 'UGUI & TextMesh Pro' started by splash5, Jul 22, 2016.

  1. splash5

    splash5

    Joined:
    Nov 8, 2014
    Posts:
    13
    Hi,
    Is there anyone tried set fontNames to project included fonts (with Incl. Font Data checked) without problem?
    I tested with following code
    Code (CSharp):
    1.  
    2. Resources.GetBuiltinResource<Font>("Arial.ttf").fontNames = new string[]
    3. {
    4.         "Noto Sans",
    5.         "Noto Sans Bold",
    6.         "Noto Sans Italic",
    7.         "Noto Sans Bold Italic",
    8. };
    9.  
    and it just always fallbacks to Arial, but if I set fontNames with OS installed font name (can be retrived from Font.GetOSInstalledFontNames), and everything is ok.