public static bool FindGlyph(ref Texture_Font_T font, char codepoint, out Texture_Glyph_T Glyph) { Texture_Glyph_T glyph; int uintcodepoint = char.ConvertToUtf32(codepoint.ToString(), 0); for (int i = 0; i < font.Glyphs.Count; i++) { glyph = font.Glyphs[i]; if ((glyph.Codepoint == uintcodepoint) && ((int)uintcodepoint == -1) || ((glyph.RenderMode == font.Rendermode) && glyph.Outlinethickness == font.Outlinethickness)) { Glyph = glyph; return(true); } } Glyph = new Texture_Glyph_T(); return(false); }
public static Texture_Glyph_T InitGlyph() { Texture_Glyph_T glyph = new Texture_Glyph_T(); glyph.Codepoint = -1; glyph.Width = 0; glyph.Height = 0; glyph.RenderMode = RenderMode.RENDER_NORMAL; glyph.Outlinethickness = 0; glyph.OffsetX = 0; glyph.OffsetY = 0; glyph.Advancex = 0; glyph.Advancey = 0; glyph.S01 = 0; glyph.S11 = 0; glyph.T01 = 0; glyph.T11 = 0; glyph.Kerning = new System.Collections.Generic.List <Kerning_t>(); return(glyph); }