fix fontdir bug
This commit is contained in:
parent
990ae8fd84
commit
903829eb54
1 changed files with 1 additions and 3 deletions
|
@ -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'').
|
||||||
|
|
Loading…
Reference in a new issue