refactor(重构提升): 优化转换渲染与资源压缩
build.yaml / build (push) Successful in 2m49s

This commit is contained in:
xiaoqidun committed 2026-10-06 17:53:24 +08:00
1 parent bcb9f98f8b
commit 3959664448
52 files changed
+1864 -407

No files matched your search

+2 -2
View File
@@ -1161,7 +1161,7 @@ func (e *Editor) prepareText(obj *TextObject) error {
}
code.Value = escapeOFDText(string(runes))
}
if strings.Trim(obj.Text(), "\n") == "" {
if position == 0 {
return fmt.Errorf("text codes are empty")
}
return missingGlyphError(obj.Font, missing)
@@ -1296,7 +1296,7 @@ func ofdNumber(value float64) string {
func escapeOFDText(value string) string {
var text strings.Builder
for _, char := range value {
if char < ' ' || char == '\\' || char == '\ufffe' || char == '\uffff' {
if char <= ' ' || char == '\\' || char == '\ufffe' || char == '\uffff' {
fmt.Fprintf(&text, "\\%04X", char)
} else {
text.WriteRune(char)