fix(rendering): complete character visual regression fixes

This commit is contained in:
shen
2026-09-08 13:26:42 +08:00
parent c3a6fb973e
commit cea79fe17c
15 changed files with 380 additions and 35 deletions
+8 -2
View File
@@ -57,7 +57,9 @@ func shape(idx: int) -> Dictionary:
if e.is_empty():
return {}
e = e.duplicate()
e["path"] = String(e.get("special_path", shape_path))
e["path"] = String(e.get("special_path", ""))
if e["path"] == "":
e["path"] = shape_path
e["spec_dir"] = _dir
return e
@@ -66,7 +68,9 @@ func hair(idx: int) -> Dictionary:
if e.is_empty():
return {}
e = e.duplicate()
e["path"] = String(e.get("special_path", hair_path))
e["path"] = String(e.get("special_path", ""))
if e["path"] == "":
e["path"] = hair_path
e["spec_dir"] = _dir
return e
@@ -150,6 +154,8 @@ func _parse_block(toks: Array, i: Array, top := false) -> Dictionary:
return d
func _tokval(t):
if t is String and t.begins_with(String.chr(1)):
return t.substr(1)
if t is Dictionary and t.has("str"):
return t["str"]
return str(t)