/// <summary> /// Constructs a GLFont. /// </summary> /// <param name="font">The CPU font to use.</param> /// <param name="eng">The backing engine.</param> public GLFont(Font font, GLFontEngine eng) { Engine = eng; GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha); Engine.Shaders.ColorMultShader.Bind(); Name = font.Name; Size = (int)(font.Size * eng.DPIScale); Bold = font.Bold; Italic = font.Italic; Height = font.Height; CharacterLocations = new Dictionary <string, RectangleF>(2048); Internal_Font = font; BackupFont = new Font(Engine.BackupFontFamily, font.SizeInPoints); AddAll(StringInfo.GetTextElementEnumerator(Engine.textfile).AsEnumerable <string>().ToList()); }
/// <summary> /// Constructs an empty Text VBO. /// </summary> /// <param name="fengine">The base font engine.</param> public TextVBO(GLFontEngine fengine) { Engine = fengine; }