summaryrefslogtreecommitdiff
path: root/fpdf.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-07-04 14:13:12 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-07-04 14:13:12 -0400
commitfc0728dfdeebace8a2ea23d62fa05fa2cbadbe98 (patch)
tree7c0004d2a5b684e64f22956d3f06e05453581398 /fpdf.go
parent4cdc6183e275dfb2da40b965477900081b8f905e (diff)
Example of Claudio Felber's generalized font loaing implementation
Diffstat (limited to 'fpdf.go')
-rw-r--r--fpdf.go11
1 files changed, 7 insertions, 4 deletions
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
}