This commit is contained in:
Liang Ding 2022-07-17 12:22:32 +08:00
parent c8ea858976
commit 505b973c2d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
70 changed files with 671 additions and 942 deletions

View file

@ -24,6 +24,7 @@ import (
"github.com/88250/gulu"
"github.com/ConradIrwin/font/sfnt"
"github.com/flopp/go-findfont"
"github.com/siyuan-note/logging"
ttc "golang.org/x/image/font/sfnt"
textUnicode "golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
@ -54,7 +55,7 @@ func loadFonts(currentLanguage string) (ret []string) {
if strings.HasSuffix(strings.ToLower(f), ".ttc") {
data, err := os.ReadFile(f)
if nil != err {
LogErrorf("read font file [%s] failed: %s", f, err)
logging.LogErrorf("read font file [%s] failed: %s", f, err)
continue
}
collection, err := ttc.ParseCollection(data)