From a4f287e21153dbe8a1e9536be8709cb76a4d3c38 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Thu, 16 Aug 2018 22:22:39 -0400 Subject: [PATCH] Fix #23 via doc on gg.LoadFontFace function. --- util.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util.go b/util.go index 8c34809..940517d 100644 --- a/util.go +++ b/util.go @@ -101,6 +101,11 @@ func unfix(x fixed.Int26_6) float64 { return 0 } +// LoadFontFace is a helper function to load the specified font file with +// the specified point size. Note that the returned `font.Face` objects +// are not thread safe and cannot be used in parallel across goroutines. +// You can usually just use the Context.LoadFontFace function instead of +// this package-level function. func LoadFontFace(path string, points float64) (font.Face, error) { fontBytes, err := ioutil.ReadFile(path) if err != nil {