feat(字体处理): 修复字体变换,完善子集导入
build.yaml / build (push) Successful in 5m46s

This commit is contained in:
xiaoqidun committed 2026-10-04 18:20:34 +08:00
1 parent 60eb5ac6a1
commit be697e7045
10 files changed
+508 -220

No files matched your search

+5 -1
View File
@@ -742,8 +742,12 @@ func encodeType2Number(target *bytes.Buffer, value float64) error {
}
return nil
}
fixed := math.Round(value * 65536)
if fixed < math.MinInt32 || fixed > math.MaxInt32 {
return fmt.Errorf("Type2 fixed operand out of range")
}
target.WriteByte(255)
_ = binary.Write(target, binary.BigEndian, int32(math.Round(value*65536)))
_ = binary.Write(target, binary.BigEndian, int32(fixed))
return nil
}