Size: 752 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// cs/apps/trycopilot.ai/text/draw_to_console.cc
#include <iostream>

#include "cs/apps/trycopilot.ai/text/fonts/mono.hh"

using ::cs::apps::trycopilotai::text::fonts::Mono;

int main() {
  // Print each character and it's associated mono font
  // drawn from an array
  for (unsigned int i = 0; i < sizeof(Mono); i++) {
    // clang-format off
    std::cout << (char)(i + 'A') << " (index=" << i
              << "):" << "\n";
    // clang-format on
    for (int y = 0; y < 8; y++) {
      for (int x = 0; x < 8; x++) {
        int flag = Mono[i][y][x];
        if (flag) {
          std::cout << "o";
        } else {
          std::cout << " ";
        }
        std::cout << " ";
      }
      std::cout << "\n";
    }
    std::cout << "\n";
  }
}
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-3:8080 in 4ms.