Skip to content

Commit

Permalink
no font is fatal to pngs, not a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pbnjay committed Feb 11, 2020
1 parent e10d771 commit b108266
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drawing/png.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b108266

Please sign in to comment.