public GlyphCache CacheGlyph(int glyph_code, int glyph_index, SimpleFont.GlyphDataType data_type, Rect bounds, double advance_x, double advance_y) { GlyphCache glyph; if (m_glyphs.TryGetValue(glyph_code, out glyph)) { // Already exists, do not overwrite return(null); } glyph = new GlyphCache(); glyph.glyph_index = glyph_index; glyph.data_type = data_type; glyph.bounds = bounds; glyph.advance_x = advance_x; glyph.advance_y = advance_y; m_glyphs.Add(glyph_code, glyph); return(glyph); }
public GlyphCache CacheGlyph(int glyph_code, int glyph_index, SimpleFont.GlyphDataType data_type, Rect bounds, double advance_x, double advance_y) { if (m_CurrentFont != null) { return(m_CurrentFont.CacheGlyph(glyph_code, glyph_index, data_type, bounds, advance_x, advance_y)); } return(null); }