From fc0728dfdeebace8a2ea23d62fa05fa2cbadbe98 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Sat, 4 Jul 2015 14:13:12 -0400 Subject: Example of Claudio Felber's generalized font loaing implementation --- fpdf.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'fpdf.go') diff --git a/fpdf.go b/fpdf.go index f4d7bdc..08f0fb3 100644 --- a/fpdf.go +++ b/fpdf.go @@ -313,10 +313,13 @@ func (f *Fpdf) SetFontLocation(fontDirStr string) { f.fontpath = fontDirStr } -// SetFontLoader sets a loader used to load font files (.json and .z) from -// arbitrary locations. If a font loader has been specified, Fpdf first tries -// to load files using the font loader. If the loading files Fpdf tries to -// load the font from the configured fonts directory (see SetFontLocation). +// SetFontLoader sets a loader used to read font files (.json and .z) from an +// arbitrary source. If a font loader has been specified, it is used to load +// the named font resources when AddFont() is called. If this operation fails, +// an attempt is made to load the resources from the configured font directory +// (see SetFontLocation()). +// +// See tutorial 29 for an example of this method. func (f *Fpdf) SetFontLoader(loader FontLoader) { f.fontLoader = loader } -- cgit v1.2.1-24-ge1ad