Fresco/Berlin/modules/Drawing/openGL FTFont.cc,1.5,1.6

Nick Lewycky <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/modules/Drawing/openGL
In directory purcel:/tmp/cvs-serv21323

Modified Files:
	FTFont.cc 
Log Message:
Catch font loading error and toss the exception.
http://issues.fresco.org/bug188


Index: FTFont.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Drawing/openGL/FTFont.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- FTFont.cc	5 Jan 2003 16:21:31 -0000	1.5
+++ FTFont.cc	19 Feb 2003 22:36:59 -0000	1.6
@@ -58,7 +58,8 @@
   Prague::Path path = RCManager::get_path("unifontpath");
   std::string font_file = path.lookup_file("unifont.bdf");
   FT_Init_FreeType(&my_library);
-  FT_New_Face(my_library, font_file.c_str(), 0, &my_face);
+  if (FT_New_Face(my_library, font_file.c_str(), 0, &my_face) != 0)
+    throw std::runtime_error("unifont.bdf not found. Please check your font path!");
   FT_Set_Char_Size(my_face, 0, my_size*64, 72, 72);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.