diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c73c11..6ceaa89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ set(ASSETS res/test.kble res/burn.kble res/bounce.kble + res/fonts/dina.png ) set(FLAGS -std=c99 -Os -Wall -Wextra -Wshadow) diff --git a/README b/README new file mode 100644 index 0000000..20f2928 --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +Font +---- + +Dina @ https://www.dcmembers.com/jibsen/download/61/ diff --git a/res/fonts/dina.png b/res/fonts/dina.png new file mode 100644 index 0000000..9cf2aca Binary files /dev/null and b/res/fonts/dina.png differ diff --git a/res/fonts/fxconv-metadata.txt b/res/fonts/fxconv-metadata.txt new file mode 100644 index 0000000..a7b308d --- /dev/null +++ b/res/fonts/fxconv-metadata.txt @@ -0,0 +1,6 @@ +dina.png: + type: font + charset: print + grid.size: 8x14 + proportional: true + name: font_dina diff --git a/src/level.c b/src/level.c index 37c4c3a..f68e9c2 100644 --- a/src/level.c +++ b/src/level.c @@ -110,7 +110,7 @@ level_draw(void) } /* level name */ - dprint_opt(DWIDTH - 2, DHEIGHT - 2, C_WHITE, C_BLACK, DTEXT_RIGHT, + dprint_opt(DWIDTH - 4, DHEIGHT - 2, C_BLACK, C_NONE, DTEXT_RIGHT, DTEXT_BOTTOM, "%s", levels[level.id].name); } diff --git a/src/main.c b/src/main.c index 00ed5ba..1532b01 100644 --- a/src/main.c +++ b/src/main.c @@ -44,6 +44,9 @@ main(void) static void init(void) { + extern font_t font_dina; + dfont(&font_dina); + timer = timer_configure(TIMER_ANY, 1000000 / TARGET_FPS, GINT_CALL(timer_callback, &has_ticked)); timer_start(timer);