// Rend un emoji en PNG transparent via Chromium, qui sait lire Apple Color // Emoji là où weasyprint échoue (format bitmap sbix, non géré). import { chromium } from "playwright"; const [outDir, ...emojis] = Deno.args; const b = await chromium.launch({ headless: true }); const p = await (await b.newContext({ deviceScaleFactor: 8 })).newPage(); for (const [i, e] of emojis.entries()) { await p.setContent( `
${e}`); const el = p.locator("#g"); const f = `${outDir}/emoji-${i + 1}.png`; await el.screenshot({ path: f, omitBackground: true }); console.log(` ${e} -> ${f}`); } await b.close();