private void GenerateGlyphData(ushort characterCount) { Log.Info("Font: Generating glyph data for {0} characters", characterCount); glyphs = new FontGlyph[characterCount]; for (ushort i = 0; i < characterCount; ++i) { if (SDL_ttf.TTF_GlyphIsProvided(handle, i) == 0) { continue; } if (SDL_ttf.TTF_GlyphMetrics(handle, i, out glyphs[i].minX, out glyphs[i].maxX, out glyphs[i].minY, out glyphs[i].maxY, out glyphs[i].advance) != 0) { throw new ApplicationException("Failed to get glyph metrics for glyph " + i + " : " + SDL.SDL_GetError()); } } }
public int GlyphIsProvided(char Ch) { return(SDL_ttf.TTF_GlyphIsProvided(myPtr, Ch)); }
public bool HasGlyph(UInt16 ch) { return(SDL_ttf.TTF_GlyphIsProvided(_sdlFont, ch) > 0); }