[poppler] poppler/poppler: CairoFontEngine.cc,1.7,1.8

Kristian Hogsberg krh at freedesktop.org
Sat Apr 23 13:16:04 PDT 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv13429/poppler

Modified Files:
	CairoFontEngine.cc 
Log Message:
2005-04-23  Kristian Høgsberg  <krh at redhat.com>

        * poppler/CairoFontEngine.cc: Use the right fileName for loading
        CID fonts (#3114).



Index: CairoFontEngine.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoFontEngine.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CairoFontEngine.cc	22 Apr 2005 17:29:49 -0000	1.7
+++ CairoFontEngine.cc	23 Apr 2005 20:16:02 -0000	1.8
@@ -165,6 +165,7 @@
   case fontType1:
   case fontType1C:
     if (FT_New_Face(lib, fileName->getCString(), 0, &face)) {
+      error(-1, "could not create type1 face");
       goto err2;
     }
     
@@ -189,6 +190,7 @@
     /* Fall through */
   case fontTrueType:
     if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
+      error(-1, "failed to load truetype font\n");
       goto err2;
     }
     /* This might be set already for the CIDType2 case */
@@ -198,6 +200,7 @@
     }
     if (!openTempFile(&tmpFileName2, &tmpFile, "wb", NULL)) {
       delete ff;
+      error(-1, "failed to open truetype tempfile\n");
       goto err2;
     }
     ff->writeTTF(&fileWrite, tmpFile);
@@ -205,6 +208,7 @@
     delete ff;
 
     if (FT_New_Face(lib, tmpFileName2->getCString(), 0, &face)) {
+      error(-1, "could not create truetype face\n");
       goto err2;
     }
     unlink (tmpFileName2->getCString());
@@ -221,8 +225,9 @@
       codeToGID = NULL;
       codeToGIDLen = 0;
     }
-    if (FT_New_Face(lib, tmpFileName2->getCString(), 0, &face)) {
+    if (FT_New_Face(lib, tmpFileName->getCString(), 0, &face)) {
       gfree(codeToGID);
+      error(-1, "could not create cid face\n");
       goto err2;
     }
     break;
@@ -249,9 +254,11 @@
   cairo_font = cairo_ft_font_create_for_ft_face (face, FT_LOAD_NO_HINTING,
 						 matrix);
   cairo_matrix_destroy (matrix);
-  if (cairo_font == NULL)
+  if (cairo_font == NULL) {
+    error(-1, "could not create cairo font\n");
     goto err2; /* this doesn't do anything, but it looks like we're
 		* handling the error */
+  }
 
   return;
  err2:



More information about the poppler mailing list