Remove new7x13Atlas function

This commit is contained in:
Peter Hellberg 2018-01-19 23:08:06 +01:00
parent 5f53a59dd6
commit f72c39f382
2 changed files with 2 additions and 6 deletions

View File

@ -9,7 +9,6 @@ import (
"github.com/faiface/pixel" "github.com/faiface/pixel"
"golang.org/x/image/font" "golang.org/x/image/font"
"golang.org/x/image/font/basicfont"
"golang.org/x/image/math/fixed" "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 return rect, glyph.Frame, bounds, dot
} }
func new7x13Atlas(runeSets ...[]rune) *Atlas {
return NewAtlas(basicfont.Face7x13, runeSets...)
}
type fixedGlyph struct { type fixedGlyph struct {
dot fixed.Point26_6 dot fixed.Point26_6
frame fixed.Rectangle26_6 frame fixed.Rectangle26_6

View File

@ -7,6 +7,7 @@ import (
"unicode/utf8" "unicode/utf8"
"github.com/faiface/pixel" "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. // 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 { for i := range ASCII {
ASCII[i] = rune(32 + i) 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 // RangeTable takes a *unicode.RangeTable and generates a set of runes contained within that