From 6eb41f01c17fadfafb7c9c192880267d0361caa2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 5 Jun 2016 13:42:40 -0400 Subject: Copy fonts maps to template in order for font styles to work. Thanks, geekpex. --- template_impl.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'template_impl.go') diff --git a/template_impl.go b/template_impl.go index c94f880..3a23921 100644 --- a/template_impl.go +++ b/template_impl.go @@ -80,9 +80,9 @@ func (t *FpdfTpl) Templates() []Template { return t.templates } -// Tpl is an Fpdf used for writing a template. -// It has most of the facilities of an Fpdf,but cannot add more pages. -// Tpl is used directly only during the limited time a template is writable. +// Tpl is an Fpdf used for writing a template. It has most of the facilities of +// an Fpdf, but cannot add more pages. Tpl is used directly only during the +// limited time a template is writable. type Tpl struct { Fpdf } @@ -101,6 +101,7 @@ func (t *Tpl) loadParamsFromFpdf(f *Fpdf) { t.Fpdf.color.fill = f.color.fill t.Fpdf.color.text = f.color.text + t.Fpdf.fonts = f.fonts t.Fpdf.currentFont = f.currentFont t.Fpdf.fontFamily = f.fontFamily t.Fpdf.fontSize = f.fontSize -- cgit v1.2.1-24-ge1ad