Ejemplo n.º 1
0
        public static Font GetFont(Renderer.RendererBase renderer, string faceName, int size = 10, FontStyle style = 0)
        {
            if (m_Instance == null)
            {
                m_Instance = new FontCache();
            }

            return(m_Instance.InternalGetFont(renderer, faceName, size, style));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new font instance. This function uses a font cache to load the font.
 /// This is preferable method to create a font. User don't need to worry about
 /// disposing the font.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 /// <param name="faceName">Face name.</param>
 /// <param name="size">Font size.</param>
 /// <param name="style">Font style.</param>
 /// <returns>Font.</returns>
 public static Font Create(Renderer.RendererBase renderer, string faceName, int size = 10, FontStyle style = 0)
 {
     return(FontCache.GetFont(renderer, faceName, size, style));
 }