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

Function decodeFont

src/utils/ansiToPng.ts:60–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58const FONT: Map<number, Uint8Array> = decodeFont()
59
60function decodeFont(): Map<number, Uint8Array> {
61 const buf = Buffer.from(FONT_B64, 'base64')
62 const count = buf.readUInt16LE(0)
63 const map = new Map<number, Uint8Array>()
64 let off = 2
65 for (let i = 0; i < count; i++) {
66 const cp = buf.readUInt32LE(off)
67 off += 4
68 map.set(cp, buf.subarray(off, off + GLYPH_BYTES))
69 off += GLYPH_BYTES
70 }
71 return map
72}
73
74export type AnsiToPngOptions = {
75 /** 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.45

Tested by

no test coverage detected