feat(字体渲染): 加强字体兼容性

This commit is contained in:
2026-06-25 09:31:42 +08:00
parent 788767e8e6
commit 8edc2a0bb5
9 changed files with 787 additions and 65 deletions
+18
View File
@@ -149,3 +149,21 @@ func parseFloatsWithG(s string) []float64 {
}
return result
}
// parseInts 解析整数数组
// 入参: s 字符串
// 返回: []int 整数数组
func parseInts(s string) []int {
if s == "" {
return nil
}
s = strings.ReplaceAll(s, ",", " ")
parts := strings.Fields(s)
result := make([]int, 0, len(parts))
for _, p := range parts {
if v, err := strconv.Atoi(p); err == nil {
result = append(result, v)
}
}
return result
}