{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dotfont",
  "type": "registry:lib",
  "title": "Doto Dotfont helper",
  "description": "Shared Doto UI helper (dotfont.ts) used by several components.",
  "author": "Ahmad Raza (MrReal) <https://ahmadraza.cv>",
  "registryDependencies": [
    "https://doto-ui.ahmadraza.cv/r/doto-theme.json"
  ],
  "files": [
    {
      "path": "registry/doto-ui/dotfont.ts",
      "content": "/* 5×7 dot-matrix font. Each glyph = 7 rows, each row a base-32 digit holding 5 bits. */\nconst RAW: Record<string, string> = {\n  A: 'ehhvhhh', B: 'uhhuhhu', C: 'ehggghe', D: 'sihhhis', E: 'vgguggv', F: 'vgguggg', G: 'ehgnhhf',\n  H: 'hhhvhhh', I: 'e44444e', J: '72222ic', K: 'hikokih', L: 'ggggggv', M: 'hrllhhh', N: 'hplljhh',\n  O: 'ehhhhhe', P: 'uhhuggg', Q: 'ehhhlid', R: 'uhhukih', S: 'fgge11u', T: 'v444444', U: 'hhhhhhe',\n  V: 'hhhhha4', W: 'hhhllla', X: 'hha4ahh', Y: 'hhha444', Z: 'v1248gv',\n  '0': 'ehjlphe', '1': '4c4444e', '2': 'eh1248v', '3': 'v2421he', '4': '26aiv22', '5': 'vgu11he',\n  '6': '68guhhe', '7': 'v124888', '8': 'ehhehhe', '9': 'ehhf12c',\n  ' ': '0000000', '·': '0004000', '-': '000v000', '!': '4444404', '?': 'eh12404', ':': '0400040',\n  '.': '0000004', '♥': '0avve40',\n};\n\nexport const glyph = (ch: string) => (RAW[ch] ?? RAW[' ']).split('').map((c) => parseInt(c, 32));\nexport const SUPPORTED = /[^A-Z0-9 ·\\-!?:.♥]/g;\n\n/** Lit cells for a string: [col, row] pairs, 6 columns per character. */\nexport function textCells(text: string) {\n  const cells: [number, number][] = [];\n  let col = 0;\n  for (const ch of text.toUpperCase()) {\n    glyph(ch).forEach((row, r) => {\n      for (let k = 0; k < 5; k++) if ((row >> (4 - k)) & 1) cells.push([col + k, r]);\n    });\n    col += 6;\n  }\n  return { cells, cols: col };\n}\n",
      "type": "registry:lib",
      "target": "@components/doto-ui/dotfont.ts"
    }
  ]
}
