- throw std::logic_error("FreeType init failed.");
- if (FT_New_Face(library, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 0, &font))
- throw std::logic_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("FreeType init failed.");
+
+ // Georgia
+ if (FT_New_Face(library, "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf", 0, &face))
+ throw std::runtime_error("Face opening failed.");
+ if (FT_Set_Char_Size(face, 0, 12 * 64, 96, 96))
+ throw std::runtime_error("Size set failed.");
+ fonts.push_back(face);
+
+ // FreeSerif
+ if (FT_New_Face(library, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 0, &face)) {
+ std::fprintf(stderr, "Warning: Couldn't open FreeSerif, some glyphs might not be available\n");
+ } else {
+ if (FT_Set_Char_Size(face, 0, 12 * 64, 96, 96))
+ throw std::runtime_error("Size set failed.");
+ fonts.push_back(face);
+ }
+
+ // Arial Unicode MS
+ if (FT_New_Face(library, "arialuni.ttf", 0, &face)) {
+ std::fprintf(stderr, "Warning: Couldn't open Arial Unicode MS, some glyphs might not be available\n");
+ } else {
+ if (FT_Set_Char_Size(face, 0, 12 * 64, 96, 96))
+ throw std::runtime_error("Size set failed.");
+ fonts.push_back(face);
+ }