summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/fb_font_freetype.c3
-rw-r--r--framebuffer/fb_gui.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/framebuffer/fb_font_freetype.c b/framebuffer/fb_font_freetype.c
index 64c76c172..8c3ae76b3 100644
--- a/framebuffer/fb_font_freetype.c
+++ b/framebuffer/fb_font_freetype.c
@@ -99,7 +99,7 @@ fb_new_face(const char *fontfile)
FT_Face aface;
newf = calloc(1, sizeof(fb_faceid_t));
- newf->fontfile=strdup(fontfile);
+ newf->fontfile = strdup(fontfile);
error = FTC_Manager_LookupFace(ft_cmanager, (FTC_FaceID)newf, &aface);
if (error) {
@@ -149,6 +149,7 @@ bool fb_font_init(void)
fb_face_sans_serif = fb_new_face("/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf");
if (fb_face_sans_serif == NULL) {
LOG(("Could not find default font (code %d)\n", error));
+ FTC_Manager_Done(ft_cmanager );
FT_Done_FreeType(library);
return false;
}
diff --git a/framebuffer/fb_gui.c b/framebuffer/fb_gui.c
index cb88a7b7f..276aba62d 100644
--- a/framebuffer/fb_gui.c
+++ b/framebuffer/fb_gui.c
@@ -260,12 +260,13 @@ void gui_init(int argc, char** argv)
default:
LOG(("Unsupported bit depth (%d)", framebuffer->bpp));
- exit(1);
+ die("Unsupported bit depth");
}
framebuffer->cursor = fb_cursor_init(framebuffer, &pointer_image);
- fb_font_init();
+ if (fb_font_init() == false)
+ die("Unable to initialise the font system");
}