There is an issue with the styleOverrideTable when the override is a default text style value, it does not express the override back to the default value.
For example, if the entire text node is underlined, but one character is overridden to not be underlined, the expected behavior of the styleOverrideTable would be that character has {textCase: “ORIGINAL”} but instead we get back an empty object {}.
Here is an example that illustrates the problem:
Figma – 19 Jun 24
And the JSON we get from the REST API:
"characters": "FAQs",
"style": {
"fontFamily": "Rubik",
"fontPostScriptName": "Rubik-Medium",
"fontWeight": 500,
"textCase": "UPPER",
"textAutoResize": "WIDTH_AND_HEIGHT",
"textDecoration": "UNDERLINE",
"fontSize": 12,
"textAlignHorizontal": "RIGHT",
"textAlignVertical": "TOP",
"letterSpacing": 0.24,
"lineHeightPx": 14.219999313354492,
"lineHeightPercent": 100,
"lineHeightUnit": "INTRINSIC_%"
},
"layoutVersion": 0,
"characterStyleOverrides": d
2,
78,
79,
3
],
"styleOverrideTable": {
"2": {
"textDecoration": "UNDERLINE"
},
"3": {
"textDecoration": "UNDERLINE"
},
"78": {
"fontFamily": "Rubik",
"fontPostScriptName": "RubikRoman-ExtraBold",
"fontWeight": 813
},
"79": {}
},
There is no possible way to know that the “Q” is not underlined with this response. “79”: {} should be “79”: {textCase: “ORIGINAL”} to unset the base “UNDERLINE”.
Note that this issue is seen with all character overrides to any default value, not just underline.