Skip to content

Commit

Permalink
Change Blox 2 font to a much more readible RC Rocket
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmaniak committed Aug 8, 2024
1 parent 5d06263 commit ad73622
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 86 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.bmp filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.otf filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
3 changes: 0 additions & 3 deletions res/font/Blox2.ttf

This file was deleted.

79 changes: 0 additions & 79 deletions res/font/blox.txt

This file was deleted.

3 changes: 3 additions & 0 deletions res/fonts/rc-rocket-font/RcRocketRegular-0WVW9.otf
Git LFS file not shown
2 changes: 2 additions & 0 deletions res/fonts/rc-rocket-font/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
license: Public Domain
link: https://www.fontspace.com/rc-rocket-font-f85241
2 changes: 1 addition & 1 deletion src/font.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Font::Font(
std::string passed_text,
const unsigned int passed_size):
size(passed_size * Graphics.pixelart_px_size_),
name_(FONT_NAME),
name_("rc-rocket-font" + std::string(SEPARATOR) + FONT_NAME),
text_(passed_text) {
const std::string path = FONT_PATH + SEPARATOR + name_;
SDL_Surface* surface;
Expand Down
2 changes: 1 addition & 1 deletion src/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "graphics.h"
#include "os_env.h"

#define FONT_NAME "Blox2.ttf"
#define FONT_NAME "RcRocketRegular-0WVW9.otf"

class Font {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Credits_menu::Credits_menu(Graphics& graphics): Menu(graphics) {
text_lines_.push_back(new Font(graphics, "Programming", TEXT_FONT_SZ));
text_lines_.push_back(new Font(graphics, "mattmaniak", TEXT_FONT_SZ));
text_lines_.push_back(new Font(graphics, "Graphics", TEXT_FONT_SZ));
text_lines_.push_back(new Font(graphics, "Jakub QooBooS Mieszczak",
text_lines_.push_back(new Font(graphics, "Jakub \"QooBooS\" Mieszczak",
TEXT_FONT_SZ));

// Center the lines.
Expand Down
2 changes: 1 addition & 1 deletion src/os_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const char SEPARATOR[] = "\\";
#define HITBOXES_PATH RESOURCES_PATH + std::string(SEPARATOR) + "hitboxes" \
+ std::string(SEPARATOR)

#define FONT_PATH RESOURCES_PATH + std::string(SEPARATOR) + "font" \
#define FONT_PATH RESOURCES_PATH + std::string(SEPARATOR) + "fonts" \
+ std::string(SEPARATOR)

#endif // SRC_OS_ENV_H_

0 comments on commit ad73622

Please sign in to comment.