MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / decodeFont

Function decodeFont

source code/utils/ansiToPng.ts:62–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60const FONT: Map<number, Uint8Array> = decodeFont()
61
62function decodeFont(): Map<number, Uint8Array> {
63 const buf = Buffer.from(FONT_B64, 'base64')
64 const count = buf.readUInt16LE(0)
65 const map = new Map<number, Uint8Array>()
66 let off = 2
67 for (let i = 0; i < count; i++) {
68 const cp = buf.readUInt32LE(off)
69 off += 4
70 map.set(cp, buf.subarray(off, off + GLYPH_BYTES))
71 off += GLYPH_BYTES
72 }
73 return map
74}
75
76export type AnsiToPngOptions = {
77 /** Integer zoom factor (nearest-neighbor). Default 1 — the font is already rasterized at output resolution. */

Callers 1

ansiToPng.tsFile · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected