Switch font size to 22.

My old eyes ain't what they used to be.
This commit is contained in:
Simon Forman 2023-02-26 13:09:02 -08:00
parent f7b644d210
commit 27385e5319
3 changed files with 5916 additions and 3024 deletions

View File

@ -1,6 +1,6 @@
FONT=Inconsolata
POINTSIZE=14
POINTSIZE=22
FILL=white
TXTS=00.txt 01.txt 02.txt 03.txt 04.txt 05.txt 06.txt 07.txt 08.txt 09.txt 10.txt 11.txt 12.txt 13.txt 14.txt 15.txt 16.txt 17.txt 18.txt 19.txt 20.txt 21.txt 22.txt 23.txt 24.txt 25.txt 26.txt 27.txt 28.txt 29.txt 30.txt 31.txt 32.txt 33.txt 34.txt 35.txt 36.txt 37.txt 38.txt 39.txt 40.txt 41.txt 42.txt 43.txt 44.txt 45.txt 46.txt 47.txt 48.txt 49.txt 50.txt 51.txt 52.txt 53.txt 54.txt 55.txt 56.txt 57.txt 58.txt 59.txt 60.txt 61.txt 62.txt 63.txt 64.txt 65.txt 66.txt 67.txt 68.txt 69.txt 70.txt 71.txt 72.txt 73.txt 74.txt 75.txt 76.txt 77.txt 78.txt 79.txt 80.txt 81.txt 82.txt 83.txt 84.txt 85.txt 86.txt 87.txt 88.txt 89.txt 90.txt 91.txt 92.txt 93.txt

File diff suppressed because it is too large Load Diff

View File

@ -16,11 +16,11 @@ void
draw_char(u8 ch, u64 dest_x, u64 dest_y)
{
u32* dest = frame_buffer + FRAME_WIDTH * dest_y + dest_x;
u32* character_data = font_Inconsolata_14_data[ch];
for (size_t x = 0; x < font_Inconsolata_14_width; ++x) {
for (size_t y = 0; y < font_Inconsolata_14_height; ++y) {
u32* character_data = font_Inconsolata_22_data[ch];
for (size_t x = 0; x < font_Inconsolata_22_width; ++x) {
for (size_t y = 0; y < font_Inconsolata_22_height; ++y) {
u32* pix_ptr = dest + x + FRAME_WIDTH * y;
u32 pixel = character_data[x + font_Inconsolata_14_width * y];
u32 pixel = character_data[x + font_Inconsolata_22_width * y];
u8 alpha = pixel >> 24;
if (!alpha) { // no alpha
continue;
@ -78,7 +78,11 @@ main()
wid = window_create(FRAME_WIDTH, FRAME_HEIGHT, "Bouncing Ball Example", 0);
draw_background();
for (size_t ch = 0; ch < 94; ++ch) {
draw_char(ch, (ch % 26) * font_Inconsolata_14_width, (ch / 26) * font_Inconsolata_14_height);
draw_char(
ch,
128 + (ch % 26) * font_Inconsolata_22_width,
128 + (ch / 26) * font_Inconsolata_22_height
);
}
window_draw_frame(wid, frame_buffer);
//window_on_keydown(wid, keydown);