GUI: don't abort on font load failure

paving the way for custom fonts
This commit is contained in:
tildearrow 2022-02-14 18:00:04 -05:00
parent 1c3074bb43
commit 91579e09eb
4 changed files with 129 additions and 9 deletions

View file

@ -1,12 +1,6 @@
#include <SDL_keyboard.h>
#define _USE_MATH_DEFINES
#include "gui.h"
#include "debug.h"
#include "SDL_clipboard.h"
#include "SDL_events.h"
#include "SDL_keycode.h"
#include "SDL_render.h"
#include "SDL_video.h"
#include "fonts.h"
#include "icon.h"
#include "../ta-log.h"
@ -8073,7 +8067,7 @@ String getHomeDir() {
// GOOD LUCK WITH THIS ONE - UNTESTED
#define SYSTEM_PAT_FONT_PATH_3 "C:\\Windows\\Fonts\\vgasys.fon"
#elif defined(__APPLE__)
#define SYSTEM_FONT_PATH_1 "/System/Library/Fonts/SFNS.ttf"
#define SYSTEM_FONT_PATH_1 "/System/Library/Fonts/SFAANS.ttf"
#define SYSTEM_FONT_PATH_2 "/System/Library/Fonts/Helvetica.ttc"
#define SYSTEM_FONT_PATH_3 "/System/Library/Fonts/Helvetica.dfont"
#define SYSTEM_PAT_FONT_PATH_1 "/System/Library/Fonts/SFNSMono.ttf"

View file

@ -1,5 +1,4 @@
#include "../engine/engine.h"
#include "SDL_keycode.h"
#include "imgui.h"
#include "imgui_impl_sdl.h"
#include "imgui_impl_sdlrenderer.h"