summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2016-06-05 13:42:40 -0400
committerKurt <kurt.w.jung@gmail.com>2016-06-05 13:42:40 -0400
commit6eb41f01c17fadfafb7c9c192880267d0361caa2 (patch)
tree5bf8385526d0e13198ebca7635d4d5a8dcac253d
parentaad9690dd29226455d39e15e57e48caa39ed7b67 (diff)
Copy fonts maps to template in order for font styles to work. Thanks, geekpex.
-rw-r--r--template_impl.go7
1 files changed, 4 insertions, 3 deletions
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