mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 09:37:26 +08:00
1 parent
ee3fd02a0a
commit
64f9ec4241
87 files changed
+2693
-2289
No files matched your search
@@ -19,6 +19,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/tdewolff/canvas"
|
||||
basefont "github.com/xiaoqidun/ofdgo/internal/base/font"
|
||||
)
|
||||
|
||||
// canvasFontLoadMu 保护绘图后端加载无名称字体时使用的共享状态
|
||||
@@ -44,9 +45,9 @@ func decodeFontContainer(data []byte) ([]byte, error) {
|
||||
case "\x00\x01\x00\x00", "OTTO", "true", "ttcf":
|
||||
return data, nil
|
||||
case "wOFF":
|
||||
return decodeWOFF(data)
|
||||
return basefont.DecodeWOFF(data)
|
||||
case "wOF2":
|
||||
decoded, handled, err := decodeWOFF2(data)
|
||||
decoded, handled, err := basefont.DecodeWOFF2(data)
|
||||
if handled {
|
||||
return decoded, err
|
||||
}
|
||||
@@ -55,5 +56,5 @@ func decodeFontContainer(data []byte) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return serializeOTF(loaded.Tables)
|
||||
return basefont.SerializeOTF(loaded.Tables)
|
||||
}
|
||||
Reference in new issue
Block a user