From: Steinar H. Gunderson Date: Sat, 19 Feb 2005 12:24:03 +0000 (+0000) Subject: FreeType initialization errors are runtime errors, not logic errors. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=e99870759dc603bcce21a792ed30a4b227f11527 FreeType initialization errors are runtime errors, not logic errors. --- diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index d71b4c1..8e09f0d 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -153,15 +153,15 @@ void init_freetype() { FT_Library library; if (FT_Init_FreeType(&library)) - throw std::logic_error("FreeType init failed."); + throw std::runtime_error("FreeType init failed."); if (FT_New_Face(library, "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf", 0, &font)) - throw std::logic_error("Face opening failed."); + throw std::runtime_error("Face opening failed."); if (FT_New_Face(library, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 0, &symbolfont)) - throw std::logic_error("Face opening failed."); + throw std::runtime_error("Face opening failed."); if (FT_Set_Char_Size(font, 0, 12 * 64, 96, 96)) - throw std::logic_error("Size set failed."); + throw std::runtime_error("Size set failed."); if (FT_Set_Char_Size(symbolfont, 0, 12 * 64, 96, 96)) - throw std::logic_error("Size set failed."); + throw std::runtime_error("Size set failed."); } int my_draw_text(const widestring &str, unsigned char *buf, int xpos, int ypos, bool real_render, int r, int g, int b, FT_Face face, FT_Face symbolface)