From 5a77fece5e75cb4a8ca3aaed3c8b770b3ff1aff6 Mon Sep 17 00:00:00 2001 From: gerald1248 Date: Sun, 11 Dec 2016 01:58:46 +0100 Subject: [PATCH] WIP disabled glyph cache --- draw2dbase/text.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/draw2dbase/text.go b/draw2dbase/text.go index 4283bad..3ea24ae 100644 --- a/draw2dbase/text.go +++ b/draw2dbase/text.go @@ -10,6 +10,8 @@ func init() { // FetchGlyph fetches a glyph from the cache, calling renderGlyph first if it doesn't already exist func FetchGlyph(gc draw2d.GraphicContext, fontName string, chr rune) *Glyph { + return renderGlyph(gc, fontName, chr) + /* if glyphCache[fontName] == nil { glyphCache[fontName] = make(map[rune]*Glyph, 60) } @@ -17,6 +19,7 @@ func FetchGlyph(gc draw2d.GraphicContext, fontName string, chr rune) *Glyph { glyphCache[fontName][chr] = renderGlyph(gc, fontName, chr) } return glyphCache[fontName][chr].Copy() + */ } // renderGlyph renders a glyph then caches and returns it