mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
ab5266b924
There's some really hideous plumbing with globals going on here, but my priority right now is getting a basic VT100 terminal emulator working.
861 lines
12 KiB
C++
861 lines
12 KiB
C++
#pragma once
|
|
|
|
namespace Peanut8x8 {
|
|
|
|
static constexpr char firstCharacter = '!';
|
|
static constexpr char lastCharacter = '~';
|
|
static constexpr byte fontWidth = 8;
|
|
static constexpr byte fontHeight = 8;
|
|
|
|
static constexpr const char* font[] {
|
|
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" "
|
|
" ## "
|
|
" ",
|
|
|
|
" ## ## "
|
|
" ## ## "
|
|
" # # "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" # # "
|
|
" # # "
|
|
" ###### "
|
|
" # # "
|
|
" ###### "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # # "
|
|
" # # "
|
|
" #### "
|
|
" # # "
|
|
" # # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ## # "
|
|
" ## ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## ## "
|
|
" # ## "
|
|
" ",
|
|
|
|
" "
|
|
" ## "
|
|
" # # "
|
|
" ### "
|
|
" # # #"
|
|
" # ## "
|
|
" ### #"
|
|
" ",
|
|
|
|
" ## "
|
|
" ## "
|
|
" # "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # "
|
|
" ##### "
|
|
" # "
|
|
" # # "
|
|
" "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # "
|
|
" # "
|
|
" ##### "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ##### "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" ",
|
|
|
|
" # "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # ## "
|
|
" # # # "
|
|
" # # # "
|
|
" # # # "
|
|
" ## # "
|
|
" #### "
|
|
" ",
|
|
|
|
" # "
|
|
" ## "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ###### "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ### "
|
|
" # # "
|
|
" # # "
|
|
" ###### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # "
|
|
" # "
|
|
" ##### "
|
|
" # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ## "
|
|
" ## "
|
|
" # "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" # "
|
|
" ## "
|
|
" ## "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" "
|
|
" ## "
|
|
" ## "
|
|
" ",
|
|
|
|
" ## "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ## "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ###### "
|
|
" "
|
|
" ###### "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" ## "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ## "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" ## "
|
|
" "
|
|
" ## "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # ### "
|
|
" # # # "
|
|
" # ### "
|
|
" # "
|
|
" #### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" ###### "
|
|
" # # "
|
|
" # # "
|
|
"### ###"
|
|
" ",
|
|
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" ###### "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # # "
|
|
" # "
|
|
" #### "
|
|
" # "
|
|
" # # "
|
|
" ###### "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # # "
|
|
" # "
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" # ###"
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ###### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" ##### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # # "
|
|
" ### "
|
|
" ",
|
|
|
|
" ### ###"
|
|
" # # "
|
|
" # # "
|
|
" ### "
|
|
" # # "
|
|
" # # "
|
|
" ### ###"
|
|
" ",
|
|
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # # "
|
|
" ###### "
|
|
" ",
|
|
|
|
" # # "
|
|
" ## ## "
|
|
" # ## # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
"### ###"
|
|
" ",
|
|
|
|
" # # "
|
|
" ## # "
|
|
" # # # "
|
|
" # # # "
|
|
" # ## "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # # "
|
|
" # # "
|
|
" ### # "
|
|
" ",
|
|
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" ### # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" #### "
|
|
" # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
"####### "
|
|
"# # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
"### ###"
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
"### ### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
"### ###"
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # ## # "
|
|
" ## ## "
|
|
" # # "
|
|
" ",
|
|
|
|
"## ## "
|
|
" # # "
|
|
" # # "
|
|
" # "
|
|
" # # "
|
|
" # # "
|
|
"## ## "
|
|
" ",
|
|
|
|
"## ## "
|
|
" # # "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" ###### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # # "
|
|
" ###### "
|
|
" ",
|
|
|
|
" #### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" #### "
|
|
" ",
|
|
|
|
" # "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" ## "
|
|
" # "
|
|
" ",
|
|
|
|
" #### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" #### "
|
|
" ",
|
|
|
|
" # "
|
|
" # # "
|
|
" # # "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ###### "
|
|
" ",
|
|
|
|
" ## "
|
|
" ## "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" # ## "
|
|
" ### # "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" ###### "
|
|
" # "
|
|
" #### "
|
|
" ",
|
|
|
|
" ### "
|
|
" # "
|
|
" #### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" # "
|
|
" #### ",
|
|
|
|
" # "
|
|
" # "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" # "
|
|
" "
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" # "
|
|
" "
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ## ",
|
|
|
|
"### "
|
|
" # "
|
|
" # ## "
|
|
" # # "
|
|
" ## # "
|
|
" # # "
|
|
"### # "
|
|
" ",
|
|
|
|
" ## "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ## ## "
|
|
" # # #"
|
|
" # # #"
|
|
" # #"
|
|
" # #"
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" #### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" # "
|
|
"### ",
|
|
|
|
" "
|
|
" "
|
|
" ##### "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" # "
|
|
" ###",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" # # "
|
|
" # "
|
|
" # "
|
|
"### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" #### "
|
|
" ## # "
|
|
" ## "
|
|
" # ## "
|
|
" #### "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" #### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" #### #"
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ## "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # # #"
|
|
" # # #"
|
|
" # # #"
|
|
" # # #"
|
|
" ## ###"
|
|
" ",
|
|
|
|
|
|
" "
|
|
" "
|
|
" # # "
|
|
" # # "
|
|
" # "
|
|
" # # "
|
|
" # # "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" # # "
|
|
" # # "
|
|
" # # "
|
|
" ##### "
|
|
" # "
|
|
" #### ",
|
|
|
|
" "
|
|
" "
|
|
" ###### "
|
|
" # "
|
|
" ## "
|
|
" # "
|
|
" ###### "
|
|
" ",
|
|
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ",
|
|
|
|
" ### "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" # "
|
|
" ### "
|
|
" ",
|
|
|
|
" "
|
|
" "
|
|
" "
|
|
" ## # "
|
|
" # ## "
|
|
" "
|
|
" "
|
|
" ",
|
|
};
|
|
|
|
}
|
|
|