From f72c39f3826dbc29bd07c964324ea8f1707da913 Mon Sep 17 00:00:00 2001 From: Peter Hellberg Date: Fri, 19 Jan 2018 23:08:06 +0100 Subject: [PATCH] Remove new7x13Atlas function --- text/atlas.go | 5 ----- text/text.go | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/text/atlas.go b/text/atlas.go index 67000cf..b7ddf43 100644 --- a/text/atlas.go +++ b/text/atlas.go @@ -9,7 +9,6 @@ import ( "github.com/faiface/pixel" "golang.org/x/image/font" - "golang.org/x/image/font/basicfont" "golang.org/x/image/math/fixed" ) @@ -175,10 +174,6 @@ func (a *Atlas) DrawRune(prevR, r rune, dot pixel.Vec) (rect, frame, bounds pixe return rect, glyph.Frame, bounds, dot } -func new7x13Atlas(runeSets ...[]rune) *Atlas { - return NewAtlas(basicfont.Face7x13, runeSets...) -} - type fixedGlyph struct { dot fixed.Point26_6 frame fixed.Rectangle26_6 diff --git a/text/text.go b/text/text.go index 04354a6..1247a8d 100644 --- a/text/text.go +++ b/text/text.go @@ -7,6 +7,7 @@ import ( "unicode/utf8" "github.com/faiface/pixel" + "golang.org/x/image/font/basicfont" ) // ASCII is a set of all ASCII runes. These runes are codepoints from 32 to 127 inclusive. @@ -17,7 +18,7 @@ func init() { for i := range ASCII { ASCII[i] = rune(32 + i) } - Atlas7x13 = new7x13Atlas(ASCII) + Atlas7x13 = NewAtlas(basicfont.Face7x13, ASCII) } // RangeTable takes a *unicode.RangeTable and generates a set of runes contained within that