patches/poppler-04-null-font.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 17345 1bac214cf54b
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17345
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     1
diff -urN poppler-0.12.2/poppler/TextOutputDev.cc ../SUNWgnome-pdf-viewer-2.28.2.hacked/poppler-0.12.2/poppler/TextOutputDev.cc
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     2
--- poppler-0.12.2/poppler/TextOutputDev.cc	2009-10-04 23:40:39.000000000 +0100
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     3
+++ ../SUNWgnome-pdf-viewer-2.28.2.hacked/poppler-0.12.2/poppler/TextOutputDev.cc	2010-01-14 16:19:05.588587805 +0000
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     4
@@ -233,9 +233,11 @@
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     5
   font = fontA;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     6
   fontSize = fontSizeA;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     7
   state->transform(x0, y0, &x, &y);
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     8
-  if ((gfxFont = font->gfxFont)) {
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
     9
-    ascent = gfxFont->getAscent() * fontSize;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    10
-    descent = gfxFont->getDescent() * fontSize;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    11
+  if (font) {
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    12
+    if ((gfxFont = font->gfxFont)!= NULL) {
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    13
+      ascent = gfxFont->getAscent() * fontSize;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    14
+      descent = gfxFont->getDescent() * fontSize;
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    15
+    }
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    16
   } else {
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    17
     // this means that the PDF file draws text without a current font,
1bac214cf54b 2010-01-14 Ghee Teo <[email protected]>
gheet
parents:
diff changeset
    18
     // which should never happen