fixed cache bug
This commit is contained in:
parent
1699257f6d
commit
3fcf95cc86
2 changed files with 3 additions and 4 deletions
|
@ -460,9 +460,8 @@ func (cv *Canvas) SetFont(font interface{}, size float64) {
|
||||||
} else {
|
} else {
|
||||||
f, err := LoadFont(v)
|
f, err := LoadFont(v)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
cv.state.font = f
|
|
||||||
} else {
|
|
||||||
fonts[v] = f
|
fonts[v] = f
|
||||||
|
cv.state.font = f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,8 @@ func getImage(image interface{}) *Image {
|
||||||
return img
|
return img
|
||||||
}
|
}
|
||||||
img, err := LoadImage(v)
|
img, err := LoadImage(v)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return img
|
return nil
|
||||||
}
|
}
|
||||||
images[v] = img
|
images[v] = img
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue