From 6d19118a1cee076e2c379d709273865e062c71b3 Mon Sep 17 00:00:00 2001 From: Laurent Le Goff Date: Mon, 16 Apr 2012 23:23:08 +0200 Subject: [PATCH] Add RegisterFont --- draw2d/font.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/draw2d/font.go b/draw2d/font.go index 114c511..8385629 100644 --- a/draw2d/font.go +++ b/draw2d/font.go @@ -37,6 +37,10 @@ type FontData struct { Style FontStyle } +func RegisterFont(fontfilename string, font *truetype.Font) { + fonts[fontfilename] = font +} + func GetFont(fontData FontData) *truetype.Font { fontFileName := fontData.Name switch fontData.Family {