mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-04-17 09:21:34 -05:00
revert
This commit is contained in:
parent
69e2f9e304
commit
c84a4c81ec
1 changed files with 0 additions and 6 deletions
|
@ -4,22 +4,16 @@ import { isLocalFont } from '@plugin/translators/text/font/local';
|
|||
export const findAllTextNodes = async () => {
|
||||
const fonts = new Set<string>();
|
||||
|
||||
let totalTime = 0;
|
||||
|
||||
for (const page of figma.root.children) {
|
||||
await page.loadAsync();
|
||||
|
||||
const nodes = page.findAll(node => node.type === 'TEXT') as TextNode[];
|
||||
|
||||
const startDate = Date.now();
|
||||
for (const node of nodes) {
|
||||
extractMissingFonts(node, fonts);
|
||||
}
|
||||
totalTime += Date.now() - startDate;
|
||||
}
|
||||
|
||||
console.log('Time to find all text nodes:', totalTime);
|
||||
|
||||
figma.ui.postMessage({
|
||||
type: 'CUSTOM_FONTS',
|
||||
data: Array.from(fonts)
|
||||
|
|
Loading…
Add table
Reference in a new issue