use clean path for font folder
This commit is contained in:
parent
903829eb54
commit
f5ef2c0154
1 changed files with 2 additions and 1 deletions
3
font.go
3
font.go
|
@ -7,6 +7,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"code.google.com/p/freetype-go/freetype/truetype"
|
"code.google.com/p/freetype-go/freetype/truetype"
|
||||||
)
|
)
|
||||||
|
@ -80,7 +81,7 @@ func GetFontFolder() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetFontFolder(folder string) {
|
func SetFontFolder(folder string) {
|
||||||
fontFolder = folder
|
fontFolder = filepath.Clean(folder)
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadFont(fontFileName string) *truetype.Font {
|
func loadFont(fontFileName string) *truetype.Font {
|
||||||
|
|
Loading…
Reference in a new issue