From 6166aa3c1afaee416f384645a81636267aee6d25 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Tue, 20 Dec 2016 19:30:13 -0500 Subject: [PATCH] set fontHeight in SetFontFace --- context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/context.go b/context.go index 427b183..c3b44f2 100644 --- a/context.go +++ b/context.go @@ -589,6 +589,7 @@ func (dc *Context) DrawImageAnchored(im image.Image, x, y int, ax, ay float64) { func (dc *Context) SetFontFace(fontFace font.Face) { dc.fontFace = fontFace + dc.fontHeight = float64(fontFace.Metrics().Height) / 64 } func (dc *Context) LoadFontFace(path string, points float64) error {