]> git.lizzy.rs Git - dragonblocks_alpha.git/commitdiff
Replace Ubuntu font by Minecraftia
authorElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 15 Jul 2021 20:32:30 +0000 (22:32 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 15 Jul 2021 20:32:30 +0000 (22:32 +0200)
fonts/Minecraftia.ttf [new file with mode: 0644]
fonts/Ubuntu.ttf [deleted file]
src/client/font.c
src/client/game.c

diff --git a/fonts/Minecraftia.ttf b/fonts/Minecraftia.ttf
new file mode 100644 (file)
index 0000000..2cf2af4
Binary files /dev/null and b/fonts/Minecraftia.ttf differ
diff --git a/fonts/Ubuntu.ttf b/fonts/Ubuntu.ttf
deleted file mode 100644 (file)
index 45a038b..0000000
Binary files a/fonts/Ubuntu.ttf and /dev/null differ
index 25ad0e0122c9bb1f8e462fa9ac8965cacc59afc9..bcf1763b26bd84a6bace4a463f289f48940fef0b 100644 (file)
@@ -67,13 +67,13 @@ bool font_init()
                return false;
        }
 
-       if (FT_New_Face(font.library, RESSOURCEPATH "fonts/Ubuntu.ttf", 0, &font.face)) {
-               fprintf(stderr, "Failed to load Ubuntu.ttf\n");
+       if (FT_New_Face(font.library, RESSOURCEPATH "fonts/Minecraftia.ttf", 0, &font.face)) {
+               fprintf(stderr, "Failed to load Minecraftia.ttf\n");
                return false;
        }
 
        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-       FT_Set_Pixel_Sizes(font.face, 0, 24);
+       FT_Set_Pixel_Sizes(font.face, 0, 16);
 
        for (unsigned char c = 0; c < NUM_CHARS; c++) {
                if (FT_Load_Char(font.face, c, FT_LOAD_RENDER)) {
index a8a5ce5c175258616be9ddee719162c3340c50ae..ed2c3fd3c30406365017ad543fb3f1190f4f9779 100644 (file)
@@ -19,7 +19,7 @@ static void game_loop(Client *client)
        HUDElement *fps_hud = hud_add((HUDElementDefinition) {
                .type = HUD_TEXT,
                .pos = {-1.0f, -1.0f, 0.0f},
-               .offset = {5, 32},
+               .offset = {2, 2 + 16 + 2},
                .type_def = {
                        .text = {
                                .text = "",
@@ -110,7 +110,7 @@ void game(Client *client)
        hud_add((HUDElementDefinition) {
                .type = HUD_TEXT,
                .pos = {-1.0f, -1.0f, 0.0f},
-               .offset = {5, 0},
+               .offset = {2, 2},
                .type_def = {
                        .text = {
                                .text = "Dragonblocks Alpha",