feat(渲染编辑): 修复保存、文字与渲染问题
build.yaml / build (push) Successful in 40s

This commit is contained in:
xiaoqidun committed 2026-09-23 21:05:47 +08:00
1 parent 580e7043c4
commit d6f70de7be
40 files changed
+2299 -407

No files matched your search

+8 -4
View File
@@ -59,13 +59,16 @@ func missingGlyphError(id string, characters []rune) error {
return &MissingGlyphError{FontID: id, Characters: value.String()}
}
// TextLayout 本地横向段落选项,Wrap按CTM变换前的边界宽度折行,Align为left、center、right或justify
// TextLayout 本地横向段落选项
// Shape显式启用FontShaper,保存为标准TextCode和CGTransform,不改变阅读时的原文定位
// Shaping提供可比较的塑形选项,非零值也会启用塑形,并随会话内文字编辑保留
// Wrap按CTM变换前的边界宽度折行,Align为left、center、right或justify
// LineHeight为毫米单位的基线间距,0使用字体度量;LetterSpacing为字素间的附加毫米间距,可为负
// LeftIndent和RightIndent为左右缩进,FirstLineIndent为每段首行相对左缩进的偏移,单位为毫米
// 零值保持显式换行和左对齐
// Shape显式启用FontShaper,保存为标准TextCode和CGTransform,不改变阅读时的原文定位
type TextLayout struct {
Shape bool
Shaping TextShapeOptions
Wrap bool
Align string
LineHeight float64
@@ -75,8 +78,9 @@ type TextLayout struct {
FirstLineIndent float64
}
// TextStyle 文字样式增量,Font和Color为空、Size为0时保留原值
// Size单位为毫米,Color为OFD的RGB分量字符串,保留原颜色透明度
// TextStyle 文字样式增量
// Font为空时保留原字体,Size单位为毫米且为0时保留原字号
// Color为OFD的RGB分量字符串,空值保留原颜色,修改时保留原透明度
type TextStyle struct {
Font string
Size float64