Fix for 687015 , text missing in pdf file
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Don't cache glyphs with a suspect bounding box. The patch tests for (urx!=0 && llx==urx) || (ury!=0 && lly==ury) but suggestions of a better test are welcome. Fix bug 687015 from customer 440 llx = lower left x lly = lower left y urx = upper right x ury = upper right y _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
pdf_font.ps.diff
(text/plain, 1 KB)
Index: gs/lib/pdf_font.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_font.ps,v
retrieving revision 1.57
diff -b -u -r1.57 pdf_font.ps
--- gs/lib/pdf_font.ps 26 Jun 2003 22:20:58 -0000 1.57
+++ gs/lib/pdf_font.ps 19 Oct 2003 23:36:07 -0000
@@ -1262,7 +1262,16 @@
% will not work.
5 -1 roll pop 0 5 1 roll % set wy to 0
} if
+
+ 2 copy % ... llx lly urx ury | urx ury
+ 0 ne exch 0 ne % ... llx lly urx ury | ury!=0 urx!=0
+ 3 index 6 index eq and % ... llx lly urx ury | ury!=0 (urx!=0 && llx==urx)
+ exch 2 index 5 index eq and or { % ... llx lly urx ury | (urx!=0 && llx==urx) || (ury!=0 && lly==ury)
+ % The bounding box is empty and likely incorrect. Don't cache.
+ pop pop pop pop .adjustcharwidth setcharwidth
+ } {
6 -2 roll .adjustcharwidth 6 2 roll setcachedevice
+ } ifelse
} bdef
/Tf {
1 index Page /Font rget not { 1 index /invalidfont signalerror } if