UnityEngine.Font.CreateDynamicFontFromOSFont C# (CSharp) Method

CreateDynamicFontFromOSFont() public static method

Creates a Font object which lets you render a font installed on the user machine.

public static CreateDynamicFontFromOSFont ( string fontname, int size ) : Font
fontname string The name of the OS font to use for this font object.
size int The default character size of the generated font.
return Font
        public static Font CreateDynamicFontFromOSFont(string fontname, int size)
        {
            return new Font(new string[] { fontname }, size);
        }