@dannote/figma-use 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cli/index.js +3 -2
- package/package.json +1 -1
- package/packages/plugin/dist/main.js +4 -0
package/CHANGELOG.md
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -977,8 +977,9 @@ function formatNode(node, indent = "") {
|
|
|
977
977
|
details.push(`radius: ${node.cornerRadius}px`);
|
|
978
978
|
}
|
|
979
979
|
if (node.fontSize) {
|
|
980
|
-
const
|
|
981
|
-
|
|
980
|
+
const family = node.fontFamily || "";
|
|
981
|
+
const style = node.fontStyle || "";
|
|
982
|
+
details.push(`font: ${node.fontSize}px ${family} ${style}`.trim());
|
|
982
983
|
}
|
|
983
984
|
if (node.characters && !name) {
|
|
984
985
|
details.push(`text: "${node.characters}"`);
|
package/package.json
CHANGED
|
@@ -1438,6 +1438,10 @@
|
|
|
1438
1438
|
const textNode = node;
|
|
1439
1439
|
base.characters = textNode.characters;
|
|
1440
1440
|
if (typeof textNode.fontSize === "number") base.fontSize = textNode.fontSize;
|
|
1441
|
+
if (typeof textNode.fontName === "object") {
|
|
1442
|
+
base.fontFamily = textNode.fontName.family;
|
|
1443
|
+
base.fontStyle = textNode.fontName.style;
|
|
1444
|
+
}
|
|
1441
1445
|
}
|
|
1442
1446
|
if ("children" in node) {
|
|
1443
1447
|
base.childCount = node.children.length;
|