From 863e1e2f0cd488ee4622606cef3e4b1030cbcf0d Mon Sep 17 00:00:00 2001 From: faiface Date: Tue, 9 May 2017 16:39:03 +0200 Subject: [PATCH] add note about not destroying face.Face to Atlas doc --- text/atlas.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/text/atlas.go b/text/atlas.go index 2670ecc..fc10135 100644 --- a/text/atlas.go +++ b/text/atlas.go @@ -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))