Skip to content

Text to vertical video in 100+ styles: AI codes each scene (HTML/SVG/WebGL), renders a 9:16 MP4 with music and English/Vietnamese voice. MCP, CLI and REST for AI agents.

2.8 KB
Raw Blame
// Quét guidance (mẫu gốc + mẫu trong gói đã cài, qua packs/registry.mjs) lấy tên font được nhắc.
// Dùng: node scripts/scan-guidance-fonts.mjs [--json]
import { listTemplates, readGuidance } from '../packs/registry.mjs';

const KNOWN = `Inter|Roboto|Roboto Condensed|Roboto Mono|Roboto Slab|Montserrat|Poppins|Manrope|DM Sans|DM Serif Display|DM Serif Text|DM Mono|Open Sans|Lato|Space Grotesk|Space Mono|Helvetica|Helvetica Neue|Arial|Arial Black|Impact|Work Sans|Outfit|Sora|Archivo|Archivo Black|Archivo Narrow|Barlow|Barlow Condensed|Oswald|Anton|Bebas Neue|Bebas|League Gothic|Teko|Fjalla One|Big Shoulders Display|Saira Condensed|Nunito|Nunito Sans|Baloo|Baloo 2|Fredoka|Fredoka One|Quicksand|Varela Round|Comfortaa|Rubik|Luckiest Guy|Bangers|Lilita One|Chewy|Titan One|Bowlby One|Playfair|Playfair Display|Cormorant|Cormorant Garamond|Lora|Merriweather|Libre Baskerville|EB Garamond|Garamond|Georgia|Times|Times New Roman|Noto Serif|Source Serif|Crimson|Crimson Text|Cinzel|Abril Fatface|Alfa Slab One|Rockwell|Courier|Courier New|IBM Plex Mono|IBM Plex Sans|JetBrains Mono|Fira Code|Fira Sans|VT323|Press Start 2P|Pixelify Sans|Silkscreen|Caveat|Dancing Script|Pacifico|Kalam|Permanent Marker|Shadows Into Light|Patrick Hand|Indie Flower|Gloria Hallelujah|Lobster|Great Vibes|Sacramento|Satisfy|Amatic SC|Mali|Itim|Be Vietnam Pro|Inconsolata|Source Code Pro|Ubuntu|Ubuntu Mono|Exo|Exo 2|Orbitron|Rajdhani|Audiowide|Russo One|Black Ops One|Special Elite|Creepster|Nosifer|Bungee|Monoton|Syne|Unbounded|Chakra Petch|Oxanium|Share Tech Mono|Major Mono Display|Righteous|Passion One|Staatliches|Josefin Sans|Raleway|Playfair Display SC|Spectral|Bodoni|Bodoni Moda|Didot|Futura|Gotham|SF Pro|San Francisco|Segoe UI|Noto Sans|Mulish|Karla|Hind|Kanit|Prompt|Sarabun|Mitr|Pangolin|Coiny|Sriracha|Charm|Patrick Hand SC|Handlee|Neucha|Marck Script|Comic Sans|Comic Neue|Space Grotesk`.split('|');
const known = [...new Set(KNOWN)].sort((a, b) => b.length - a.length);

const counts = {};
const files = {};
for (const t of listTemplates().filter((x) => x.hasGuidance)) {
  const f = t.ref;
  let md = readGuidance(t.ref) || '';
  for (const name of known) {
    const re = new RegExp(`(?<![A-Za-z])${name.replace(/ /g, '\\s+')}(?![A-Za-z])`, 'g');
    if (re.test(md)) {
      counts[name] = (counts[name] || 0) + 1;
      (files[name] ||= []).push(f);
      md = md.replace(re, ''); // tên dài khớp trước, tránh đếm "Playfair" trong "Playfair Display"
    }
  }
}
const rows = Object.entries(counts).sort((a, b) => b[1] - a[1]);
if (process.argv.includes('--json')) console.log(JSON.stringify(Object.fromEntries(rows.map(([n, c]) => [n, { count: c, ids: files[n] }])), null, 2));
else for (const [n, c] of rows) console.log(`${String(c).padStart(3)}  ${n}  (${files[n].slice(0, 8).join(',')}${files[n].length > 8 ? '…' : ''})`);