Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

5.7 KB
Raw Blame
"""The small font: m6x11's shapes redrawn 3 pixels wide (7 pixel capitals,
5 pixel lowercase), for labels and card texts. Rows 0-6 are the capital
height, 7-8 the descenders. '#' is ink."""

_ = ""
GLYPHS = {
    " ": [_],
    "!": ["#", "#", "#", "#", "#", ".", "#"],
    '"': ["#.#", "#.#"],
    "#": [_, ".#.#.", "#####", ".#.#.", "#####", ".#.#."],
    "$": [".#.", "###", "#..", "###", "..#", "###", ".#."],
    "%": ["#.#", "..#", "..#", ".#.", "#..", "#..", "#.#"],
    "&": [".#..", "#.#.", "#.#.", ".#..", "#.##", "#.#.", ".#.#"],
    "'": ["#", "#"],
    "(": [".#", "#.", "#.", "#.", "#.", "#.", ".#"],
    ")": ["#.", ".#", ".#", ".#", ".#", ".#", "#."],
    "*": [_, "#.#", ".#.", "###", ".#.", "#.#"],
    "+": [_, _, ".#.", "###", ".#.", _],
    ",": [_, _, _, _, _, _, ".#", "#."],
    "-": [_, _, _, "###"],
    ".": [_, _, _, _, _, _, "#"],
    "/": ["..#", "..#", ".#.", ".#.", ".#.", "#..", "#.."],
    "0": ["###", "#.#", "#.#", "#.#", "#.#", "#.#", "###"],
    "1": [".#.", "##.", ".#.", ".#.", ".#.", ".#.", "###"],
    "2": ["###", "..#", "..#", "###", "#..", "#..", "###"],
    "3": ["###", "..#", "..#", ".##", "..#", "..#", "###"],
    "4": ["#.#", "#.#", "#.#", "###", "..#", "..#", "..#"],
    "5": ["###", "#..", "#..", "###", "..#", "..#", "###"],
    "6": ["###", "#..", "#..", "###", "#.#", "#.#", "###"],
    "7": ["###", "..#", "..#", "..#", ".#.", ".#.", ".#."],
    "8": [".#.", "#.#", "#.#", ".#.", "#.#", "#.#", ".#."],
    "9": ["###", "#.#", "#.#", "###", "..#", "..#", "###"],
    ":": [_, _, "#", _, _, _, "#"],
    ";": [_, _, ".#", _, _, _, ".#", "#."],
    "<": [_, "..#", ".#.", "#..", ".#.", "..#"],
    "=": [_, _, "###", _, "###"],
    ">": [_, "#..", ".#.", "..#", ".#.", "#.."],
    "?": ["###", "..#", "..#", ".##", ".#.", _, ".#."],
    "@": [".###.", "#...#", "#.###", "#.#.#", "#.###", "#....", ".###."],
    "A": [".#.", "#.#", "#.#", "###", "#.#", "#.#", "#.#"],
    "B": ["##.", "#.#", "#.#", "##.", "#.#", "#.#", "##."],
    "C": [".##", "#..", "#..", "#..", "#..", "#..", ".##"],
    "D": ["##.", "#.#", "#.#", "#.#", "#.#", "#.#", "##."],
    "E": ["###", "#..", "#..", "##.", "#..", "#..", "###"],
    "F": ["###", "#..", "#..", "##.", "#..", "#..", "#.."],
    "G": [".##", "#..", "#..", "#.#", "#.#", "#.#", ".##"],
    "H": ["#.#", "#.#", "#.#", "###", "#.#", "#.#", "#.#"],
    "I": ["###", ".#.", ".#.", ".#.", ".#.", ".#.", "###"],
    "J": ["###", "..#", "..#", "..#", "..#", "#.#", ".#."],
    "K": ["#.#", "#.#", "##.", "#..", "##.", "#.#", "#.#"],
    "L": ["#..", "#..", "#..", "#..", "#..", "#..", "###"],
    "M": ["####.", "#.#.#", "#.#.#", "#.#.#", "#.#.#", "#...#", "#...#"],
    "N": ["##.", "#.#", "#.#", "#.#", "#.#", "#.#", "#.#"],
    "O": [".#.", "#.#", "#.#", "#.#", "#.#", "#.#", ".#."],
    "P": ["##.", "#.#", "#.#", "##.", "#..", "#..", "#.."],
    "Q": [".#.", "#.#", "#.#", "#.#", "#.#", "##.", ".##"],
    "R": ["##.", "#.#", "#.#", "##.", "#.#", "#.#", "#.#"],
    "S": [".##", "#..", "#..", ".#.", "..#", "..#", "##."],
    "T": ["###", ".#.", ".#.", ".#.", ".#.", ".#.", ".#."],
    "U": ["#.#", "#.#", "#.#", "#.#", "#.#", "#.#", "###"],
    "V": ["#.#", "#.#", "#.#", "#.#", ".#.", ".#.", ".#."],
    "W": ["#...#", "#...#", "#.#.#", "#.#.#", "#.#.#", "#.#.#", ".#.#."],
    "X": ["#.#", "#.#", "#.#", ".#.", "#.#", "#.#", "#.#"],
    "Y": ["#.#", "#.#", "#.#", ".#.", ".#.", ".#.", ".#."],
    "Z": ["###", "..#", "..#", ".#.", "#..", "#..", "###"],
    "[": ["##", "#.", "#.", "#.", "#.", "#.", "##"],
    "\\": ["#..", "#..", ".#.", ".#.", ".#.", "..#", "..#"],
    "]": ["##", ".#", ".#", ".#", ".#", ".#", "##"],
    "^": [".#.", "#.#"],
    "_": [_, _, _, _, _, _, _, "###"],
    "`": ["#.", ".#"],
    "a": [_, _, "##.", "..#", ".##", "#.#", ".##"],
    "b": ["#..", "#..", "##.", "#.#", "#.#", "#.#", "##."],
    "c": [_, _, ".##", "#..", "#..", "#..", ".##"],
    "d": ["..#", "..#", ".##", "#.#", "#.#", "#.#", ".##"],
    "e": [_, _, ".#.", "#.#", "###", "#..", ".##"],
    "f": [".##", ".#.", "###", ".#.", ".#.", ".#.", ".#."],
    "g": [_, _, ".##", "#.#", "#.#", "#.#", ".##", "..#", "##."],
    "h": ["#..", "#..", "##.", "#.#", "#.#", "#.#", "#.#"],
    "i": ["#", _, "#", "#", "#", "#", "#"],
    "j": [".#", _, ".#", ".#", ".#", ".#", ".#", ".#", "#."],
    "k": ["#..", "#..", "#.#", "#.#", "##.", "#.#", "#.#"],
    "l": ["#", "#", "#", "#", "#", "#", "#"],
    "m": [_, _, "####.", "#.#.#", "#.#.#", "#.#.#", "#.#.#"],
    "n": [_, _, "##.", "#.#", "#.#", "#.#", "#.#"],
    "o": [_, _, ".#.", "#.#", "#.#", "#.#", ".#."],
    "p": [_, _, "##.", "#.#", "#.#", "#.#", "##.", "#..", "#.."],
    "q": [_, _, ".##", "#.#", "#.#", "#.#", ".##", "..#", "..#"],
    "r": [_, _, "#.#", "##.", "#..", "#..", "#.."],
    "s": [_, _, ".##", "#..", ".#.", "..#", "##."],
    "t": ["#.", "#.", "##", "#.", "#.", "#.", ".#"],
    "u": [_, _, "#.#", "#.#", "#.#", "#.#", ".##"],
    "v": [_, _, "#.#", "#.#", "#.#", ".#.", ".#."],
    "w": [_, _, "#...#", "#.#.#", "#.#.#", "#.#.#", ".#.#."],
    "x": [_, _, "#.#", "#.#", ".#.", "#.#", "#.#"],
    "y": [_, _, "#.#", "#.#", "#.#", "#.#", ".##", "..#", "##."],
    "z": [_, _, "###", "..#", ".#.", "#..", "###"],
    "{": [".#", "#.", "#.", "##", "#.", "#.", ".#"],
    "|": ["#", "#", "#", "#", "#", "#", "#"],
    "}": ["#.", ".#", ".#", "##", ".#", ".#", "#."],
    "~": [_, _, _, ".#.#", "#.#."],
    # the four suits, after the ASCII range (codes 127-130)
    "\x7f": ["...#...", "..###..", ".#####.", "#######", ".##.##.", "...#...", "..###.."],
    "\x80": [".##.##.", "#######", "#######", ".#####.", "..###..", "...#..."],
    "\x81": ["..###..", "..###..", "##.#.##", "#######", "##.#.##", "...#...", "..###.."],
    "\x82": ["...#...", "..###..", ".#####.", "#######", ".#####.", "..###..", "...#..."],
}
SUITS = "\x7f\x80\x81\x82"  # spades, hearts, clubs, diamonds
HEIGHT = 9
CAP = 7