summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2014-09-21 15:58:32 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2014-09-21 15:58:32 -0400
commit2003dae2718761b53dd3bcd302b794649e23a37d (patch)
treeb3aa59871b92bd5275f90a47a431badcd3e982b2
parent6d620c17d2dc0d44e845a0a51608c7148a92c1ee (diff)
Corrected an off-by-one indexing error in encoding list. Thanks jy.pelle!
-rw-r--r--.hgignore1
-rw-r--r--fpdf.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/.hgignore b/.hgignore
index afa3fa9..50deff5 100644
--- a/.hgignore
+++ b/.hgignore
@@ -5,3 +5,4 @@ look
open
pdf.txt
*.sublime*
+font/Ubuntu-*
diff --git a/fpdf.go b/fpdf.go
index 5fd3f63..5beb694 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -1302,7 +1302,7 @@ func (f *Fpdf) AddFontFromReader(familyStr, styleStr string, r io.Reader) {
n := -1
for j, str := range f.diffs {
if str == info.Diff {
- n = j
+ n = j + 1
break
}
}