Skip to main content

Hi there,


Can anyone explain to me when the fontFamilyPostScriptName property is null and when it holds a value?

I have added the API response to two different nodes, one with the fontFamilyPostScriptName and one without.


  "nodes": {
"13:3": {
"document": {
"id": "13:3",
"name": "desktop/headline",
"type": "TEXT",
"scrollBehavior": "SCROLLS",
"blendMode": "PASS_THROUGH",
"absoluteBoundingBox": {
"x": 0,
"y": 0,
"width": 62,
"height": 19
},
"absoluteRenderBounds": {
"x": 1.1477272510528564,
"y": 3.204545021057129,
"width": 59.5511360168457,
"height": 15.250000953674316
},
"constraints": {
"vertical": "TOP",
"horizontal": "LEFT"
},
"fills": [
{
"blendMode": "NORMAL",
"type": "SOLID",
"color": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
}
}
],
"strokes": [],
"strokeWeight": 0,
"strokeAlign": "INSIDE",
"effects": [],
"characters": "Rag 123",
"style": {
"fontFamily": "Inter",
"fontPostScriptName": "Inter-SemiBold",
"fontWeight": 600,
"textAutoResize": "WIDTH_AND_HEIGHT",
"fontSize": 16,
"textAlignHorizontal": "LEFT",
"textAlignVertical": "TOP",
"letterSpacing": 0,
"lineHeightPx": 19.363636016845703,
"lineHeightPercent": 100,
"lineHeightUnit": "INTRINSIC_%"
},
"layoutVersion": 4,
"characterStyleOverrides": [],
"styleOverrideTable": {},
"lineTypes": [
"NONE"
],
"lineIndentations": [
0
]
},
"components": {},
"componentSets": {},
"schemaVersion": 0,
"styles": {}
},
"13:5": {
"document": {
"id": "13:5",
"name": "desktop/body",
"type": "TEXT",
"scrollBehavior": "SCROLLS",
"blendMode": "PASS_THROUGH",
"absoluteBoundingBox": {
"x": 0,
"y": 0,
"width": 39,
"height": 12
},
"absoluteRenderBounds": {
"x": 0.8806818723678589,
"y": 2.627840518951416,
"width": 36.42755889892578,
"height": 9.53125
},
"constraints": {
"vertical": "TOP",
"horizontal": "LEFT"
},
"fills": [
{
"blendMode": "NORMAL",
"type": "SOLID",
"color": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
}
}
],
"strokes": [],
"strokeWeight": 0,
"strokeAlign": "INSIDE",
"effects": [],
"characters": "Rag 123",
"style": {
"fontFamily": "Inter",
"fontPostScriptName": null,
"fontWeight": 400,
"textAutoResize": "WIDTH_AND_HEIGHT",
"fontSize": 10,
"textAlignHorizontal": "LEFT",
"textAlignVertical": "TOP",
"letterSpacing": 0,
"lineHeightPx": 12.102272033691406,
"lineHeightPercent": 100,
"lineHeightUnit": "INTRINSIC_%"
},
"layoutVersion": 4,
"characterStyleOverrides": [],
"styleOverrideTable": {},
"lineTypes": [
"NONE"
],
"lineIndentations": [
0
]
},
"components": {},
"componentSets": {},
"schemaVersion": 0,
"styles": {}
}
}

Any help is appreciated!

Hi there, Thanks for reaching out! After consulting with the internal team, it appears to be related to the specific way default fonts are loaded when creating text nodes.

It seems that the default Inter font comes without a postscript name, unlike other fonts. If you switch the font style to something else and then back to Regular, the postscript name is provided, as we’ve loaded the font from the Google Font index.

Therefore, the recommendation here might be to accept that fontPostScriptName can sometimes be null and avoid making any assumptions about when it is null or not null.


Hope it helps! Please let me know if ‌I’m missing any additional points or if my explanation is unclear. I want to make sure I’m fully addressing your questions.


Thanks!


Reply