add note about not destroying face.Face to Atlas doc

This commit is contained in:
faiface 2017-05-09 16:39:03 +02:00
parent ef5de4c8c3
commit e1f364e5d1
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ type Atlas struct {
// NewAtlas creates a new Atlas containing glyphs of the given set of runes from the given font
// face.
//
// Do not destroy or close the font.Face after creating the Atlas.
func NewAtlas(face font.Face, runes []rune) *Atlas {
fixedMapping, fixedBounds := makeSquareMapping(face, runes, fixed.I(2))