citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 86710f63a29dbaa59ff98c18d6743ece53b386eb
parent 611238af66efa035bae4bf99f4d6b3cdacab592a
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Fri,  1 Apr 2016 00:02:48 -0600

viewer: make font path getting nicer

Diffstat:
Mviewer/main.cc | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/viewer/main.cc b/viewer/main.cc @@ -77,14 +77,15 @@ window::window(int argc, char *argv[]) FT_Init_FreeType(&ft_library); - ft_face = NULL; #if defined(__OpenBSD__) - FT_New_Face(ft_library, "/usr/X11R6/lib/X11/fonts/TTF/DejaVuSansMono.ttf", /* face_index */ 0, &ft_face); + const char *font_path = "/usr/X11R6/lib/X11/fonts/TTF/DejaVuSansMono.ttf"; #elif defined(__APPLE__) - FT_New_Face(ft_library, "/Library/Fonts/Andale Mono.ttf", /* face_index */ 0, &ft_face); + const char *font_path = "/Library/Fonts/Andale Mono.ttf"; #else errx(1, "PICK A FONT FOR THIS PLATFORM"); #endif + ft_face = NULL; + FT_New_Face(ft_library, font_path, /* face_index */ 0, &ft_face); font = demo_font_create(ft_face, demo_glstate_get_atlas(st));