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)); }
internal static void CreateCache(Renderer.RendererBase renderer) { m_Instance = new FontCache(renderer); }
/// <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(string faceName, int size = 10, FontStyle style = 0) { return(FontCache.GetFont(faceName, size, style)); }
/// <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)); }