poppler/Annot.cc | 4 ++-- poppler/CharCodeToUnicode.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit c20f68ce434366bbec4077824da97ce843ecdff3 Author: Marek Kasik <[email protected]> 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 <[email protected]> // Copyright (C) 2013 Peter Breitenlohner <[email protected]> // Copyright (C) 2013 Adrian Johnson <[email protected]> -// Copyright (C) 2014 Marek Kasik <[email protected]> +// Copyright (C) 2014, 2015 Marek Kasik <[email protected]> // Copyright (C) 2014 Jiri Slaby <[email protected]> // Copyright (C) 2014 Anuj Khare <[email protected]> // Copyright (C) 2015 Petr Gajdos <[email protected]> @@ -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 <[email protected]> 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 <[email protected]> // Copyright (C) 2012 Adrian Johnson <[email protected]> // Copyright (C) 2014 Jiri Slaby <[email protected]> +// Copyright (C) 2015 Marek Kasik <[email protected]> // // 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; } } _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
