♻️ 一些工具函数移动到 gulu 项目中

This commit is contained in:
Liang Ding 2022-06-23 19:35:59 +08:00
parent afbe434239
commit 705f34ccd1
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
10 changed files with 20 additions and 65 deletions

View file

@ -21,6 +21,7 @@ import (
"sort"
"strings"
"github.com/88250/gulu"
"github.com/ConradIrwin/font/sfnt"
"github.com/flopp/go-findfont"
ttc "golang.org/x/image/font/sfnt"
@ -30,7 +31,7 @@ import (
func GetSysFonts(currentLanguage string) (ret []string) {
fonts := loadFonts(currentLanguage)
ret = RemoveDuplicatedElem(fonts)
ret = gulu.Str.RemoveDuplicatedElem(fonts)
ret = removeUnusedFonts(ret)
sort.Strings(ret)
return