poppler/GfxFont.cc |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
diff-tree 56af69787c78c2edbb69266e86a5a5b639ca6d3e (from 
3d0df46908379bce1d196b9dc41153b1adb5f725)
Author: Jeff Muizelaar <[EMAIL PROTECTED]>
Date:   Wed Oct 3 23:02:25 2007 -0400

    Error out if we can't find a .cidToUnicode for a known character collection
    
    This situation was caused by the fixes for bug #11413. I'm not sure
    it's the best thing to do, but it seems better.

diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index f890fd7..63ac1c0 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -1221,6 +1221,25 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char 
 
       // look for a user-supplied .cidToUnicode file
       if (!(ctu = globalParams->getCIDToUnicode(collection))) {
+       // I'm not completely sure that this is the best thing to do
+       // but it seems to produce better results when the .cidToUnicode
+       // files from the poppler-data package are missing. At least
+       // we know that assuming the Identity mapping is definitely wrong.
+       //   -- jrmuizel
+       static const char * knownCollections [] = {
+         "Adobe-CNS1",
+         "Adobe-GB1",
+         "Adobe-Japan1",
+         "Adobe-Japan2",
+         "Adobe-Korea1",
+       };
+       for (size_t i = 0; i < 
sizeof(knownCollections)/sizeof(knownCollections[0]); i++) {
+         if (collection->cmp(knownCollections[i])) {
+           error(-1, "Missing language pack for '%s' mapping", 
collection->getCString());
+           delete collection;
+           goto err2;
+         }
+       }
        error(-1, "Unknown character collection '%s'",
              collection->getCString());
        // fall-through, assuming the Identity mapping -- this appears
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to