mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 05:33:02 -05:00
fix text
This commit is contained in:
parent
222dbaa5fc
commit
8cd89b2bbf
2 changed files with 12 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
2
src/ui/lib/types/text/textAttributes.d.ts
vendored
2
src/ui/lib/types/text/textAttributes.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
import { TextContent } from './textContent';
|
||||
|
||||
export type TextAttributes = {
|
||||
id?: string;
|
||||
id?: any;
|
||||
type: symbol;
|
||||
content?: TextContent;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue