fix(server): widen letter-spacing normalization bounds to ±256

Negative and larger letter spacing values are legitimate for extracted
text layers; clamp only outside ±256 instead of rejecting anything
below 0 (or above 80 in the extractor).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 12:26:08 +08:00
parent 906846a717
commit 568690e2f1
2 changed files with 2 additions and 2 deletions
@@ -6059,7 +6059,7 @@ func newEditableTextLayers(target design.Node, extraction design.TextExtraction)
lineHeight = 1.08
}
letterSpacing := layer.LetterSpacing
if letterSpacing < 0 {
if letterSpacing < -256 || letterSpacing > 256 {
letterSpacing = 0
}
strokeColor := strings.TrimSpace(layer.StrokeColor)