mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
30d9699385
commit
4d0a909de5
14 files changed
+438
-50
No files matched your search
@@ -14,11 +14,7 @@
|
||||
|
||||
package ofdgo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tdewolff/canvas"
|
||||
)
|
||||
import "github.com/tdewolff/canvas"
|
||||
|
||||
// loadFont 加载字体
|
||||
// 入参: fontID 字体ID
|
||||
@@ -34,13 +30,6 @@ func (r *Renderer) loadFont(fontID string) *canvas.FontFamily {
|
||||
}
|
||||
of := r.Reader.fontCache[fontID]
|
||||
if len(resolved.Data) == 0 {
|
||||
if !r.textOnly {
|
||||
name := fontID
|
||||
if of != nil && of.FontName != "" {
|
||||
name = of.FontName
|
||||
}
|
||||
r.renderError = fmt.Errorf("font %q is unavailable", name)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if of == nil {
|
||||
|
||||
Reference in new issue
Block a user