From b10826607ded0ae69b06f18004ac1eb6f3a1c757 Mon Sep 17 00:00:00 2001 From: Jeremy Jay Date: Tue, 11 Feb 2020 10:00:54 -0500 Subject: [PATCH] no font is fatal to pngs, not a warning --- drawing/png.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drawing/png.go b/drawing/png.go index 7c3819f..e03db7e 100644 --- a/drawing/png.go +++ b/drawing/png.go @@ -54,6 +54,9 @@ func (s *Settings) DrawPNG(w io.Writer, dpi float64, changelist []string, g *dat s.TextPadding *= dpiScale s.dpi = dpi } + if theFont == nil { + log.Fatalf("no font loaded - cannot make PNG!") + } d := s.prepare(changelist, g) d.png(w) }