[poppler] 2 commits - poppler/Annot.cc poppler/CharCodeToUnicode.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Oct 26 11:51:22 PDT 2015


 poppler/Annot.cc             |    4 ++--
 poppler/CharCodeToUnicode.cc |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c20f68ce434366bbec4077824da97ce843ecdff3
Author: Marek Kasik <mkasik at redhat.com>
Date:   Thu Oct 22 16:15:23 2015 +0200

    forms: Fix showing of some non-ASCII characters
    
    The &uChar is an array with just 1 member not 2.
    This fixes mapping of some Unicode characters to
    character codes.

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index f3f479c..c20398b 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -29,7 +29,7 @@
 // Copyright (C) 2012, 2015 Tobias Koenig <tokoe at kdab.com>
 // Copyright (C) 2013 Peter Breitenlohner <peb at mppmu.mpg.de>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
-// Copyright (C) 2014 Marek Kasik <mkasik at redhat.com>
+// Copyright (C) 2014, 2015 Marek Kasik <mkasik at redhat.com>
 // Copyright (C) 2014 Jiri Slaby <jirislaby at gmail.com>
 // Copyright (C) 2014 Anuj Khare <khareanuj18 at gmail.com>
 // Copyright (C) 2015 Petr Gajdos <pgajdos at suse.cz>
@@ -4125,7 +4125,7 @@ void Annot::layoutText(GooString *text, GooString *outBuf, int *i,
         // This assumes an identity CMap.
         outBuf->append((uChar >> 8) & 0xff);
         outBuf->append(uChar & 0xff);
-      } else if (ccToUnicode->mapToCharCode(&uChar, &c, 2)) {
+      } else if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) {
         ccToUnicode->decRefCnt();
         if (font->isCIDFont()) {
           // TODO: This assumes an identity CMap.  It should be extended to
commit 64735113b203bb5adaaadc65641ef6c971f82bc6
Author: Marek Kasik <mkasik at redhat.com>
Date:   Fri Oct 23 10:15:47 2015 +0200

    forms: Find correct glyph or return 0
    
    Function CharCodeToUnicode::mapToCharCode() could return
    wrong character code for given unicode character because
    of wrongly placed continue statement.

diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 5576a4a..fdb787d 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -23,6 +23,7 @@
 // Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2012 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2014 Jiri Slaby <jirislaby at gmail.com>
+// Copyright (C) 2015 Marek Kasik <mkasik at redhat.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -656,7 +657,7 @@ int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) {
       //compare the string char by char
       for (j=0; j<sMap[i].len; j++) {
         if (sMap[i].u[j] != u[j]) {
-          continue;
+          break;
         }
       }
 


More information about the poppler mailing list