fix fontdir bug

This commit is contained in:
Stani 2015-07-10 02:05:22 +02:00
parent 990ae8fd84
commit 903829eb54

View file

@ -12,7 +12,6 @@ import (
"log" "log"
"math" "math"
"os" "os"
"path/filepath"
"strconv" "strconv"
"code.google.com/p/freetype-go/freetype/truetype" "code.google.com/p/freetype-go/freetype/truetype"
@ -240,8 +239,7 @@ func (gc *GraphicContext) SetFontData(fontData draw2d.FontData) {
} }
fn := draw2d.FontFileName(fontData) fn := draw2d.FontFileName(fontData)
fn = fn[:len(fn)-4] fn = fn[:len(fn)-4]
jfn := filepath.Join(draw2d.GetFontFolder(), fn+".json") gc.pdf.AddFont(fn, style, fn+".json")
gc.pdf.AddFont(fn, style, jfn)
} }
// SetFontSize sets the font size in points (as in ``a 12 point font''). // SetFontSize sets the font size in points (as in ``a 12 point font'').