mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
This commit is contained in:
1 parent
f361c61dcc
commit
a3435d5d8d
12 files changed
+339
-58
No files matched your search
@@ -16,7 +16,6 @@ package ofdgo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"path"
|
||||
"sort"
|
||||
)
|
||||
@@ -184,14 +183,6 @@ func (r *Renderer) fontInfo(font Font) FontInfo {
|
||||
return info
|
||||
}
|
||||
|
||||
// fontFSMatchesStyle 匹配字体文件系统中的指定样式字体文件
|
||||
// 入参: fsys 字体文件系统, patterns 匹配模式列表, bold 是否粗体, italic 是否斜体
|
||||
// 返回: []string 字体文件列表
|
||||
func fontFSMatchesStyle(fsys fs.FS, patterns []string, bold, italic bool) []string {
|
||||
names, _ := fs.Glob(fsys, "*")
|
||||
return fontFileMatches(fontFileCandidates(names, path.Base), patterns, bold, italic)
|
||||
}
|
||||
|
||||
// fontUsage 统计文档字体使用次数
|
||||
// 入参: doc 文档结构, pages 页面内容列表, nil表示读取文档页面
|
||||
// 返回: map[string]int 字体使用次数
|
||||
|
||||
Reference in new issue
Block a user