0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
This commit is contained in:
Alex Sánchez 2024-04-10 12:55:39 +02:00
parent 222dbaa5fc
commit 8cd89b2bbf
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
2 changed files with 12 additions and 11 deletions

View file

@ -22,7 +22,7 @@ export const createPenpotText = (
fills: translateFills(val.fills /*, node.width, node.height*/),
fontFamily: val.fontName.family,
fontSize: val.fontSize.toString(),
fontStyle: 'normal',
fontStyle: val.fontName.style,
fontWeight: val.fontWeight.toString(),
textDecoration: translateTextDecoration(val),
textTransform: translateTextTransform(val)
@ -33,6 +33,7 @@ export const createPenpotText = (
// letterSpacing: val.letterSpacing,
} as TextNode;
});
console.log(node);
file.fontNames.add(node.fontName);
@ -52,19 +53,19 @@ export const createPenpotText = (
type: 'paragraph-set',
children: [
{
// lineHeight: node.lineHeight,
fontStyle: 'normal',
children: children,
type: 'paragraph',
fills: translateFills(node.fills /*, node.width, node.height*/),
fontFamily: node.fontName.family,
fontSize: node.fontSize.toString(),
fontStyle: node.fontName.style,
fontWeight: node.fontWeight.toString(),
textDecoration: translateTextDecoration(node),
textTransform: translateTextTransform(node),
children: children
// lineHeight: node.lineHeight,
// textAlign: translateHorizontalAlign(node.textAlignHorizontal),
// fontId: 'gfont-' + slugify(node.fontName.family.toLowerCase()),
fontSize: node.fontSize.toString(),
fontWeight: node.fontWeight.toString(),
type: 'paragraph',
textDecoration: translateTextDecoration(node),
// letterSpacing: node.letterSpacing,
fills: translateFills(node.fills /*, node.width, node.height*/),
fontFamily: node.fontName.family
}
]
}

View file

@ -1,7 +1,7 @@
import { TextContent } from './textContent';
export type TextAttributes = {
id?: string;
id?: any;
type: symbol;
content?: TextContent;
};