After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 439070 - Changing letters on selection
Changing letters on selection
Status: RESOLVED NOTGNOME
Product: evince
Classification: Core
Component: PDF
2.24.x
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 465030 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-05-17 09:06 UTC by Alexander Shopov
Modified: 2011-02-15 17:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
The screencast as an animated gif (41.76 KB, image/gif)
2007-05-17 09:07 UTC, Alexander Shopov
Details

Description Alexander Shopov 2007-05-17 09:06:49 UTC
Please describe the problem:
When text is selected - it is changed visually.
The ligature fl (fl U+FB02 LATIN SMALL LIGATURE FL) is changed to ß (U+00DF LATIN SMALL LETTER SHARP S).

Steps to reproduce:
1. Download the following document:
http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-final-draft.pdf
2. Open page 54 which is numbered 146.
3. Select the word "reflective" on the second row from the top.


Actual results:
The letter changes

Expected results:
Just inverse the text

Does this happen every time?
Yes

Other information:
Evince 0.8.0
poppler 0.5.4 (cairo).

This is what comes with Fedora Core Development (which will have to become soon Fedora Core 7)

I am not sure that this is evince's bug. It might be poppler's. If necessary - I will refile it in fd.o.

I am attaching a screen cast in gif format with the behavior.
Comment 1 Alexander Shopov 2007-05-17 09:07:50 UTC
Created attachment 88324 [details]
The screencast as an animated gif
Comment 2 Carlos Garcia Campos 2007-05-17 09:33:12 UTC
Confirm. 
Comment 3 Sven Arvidsson 2008-06-19 20:31:24 UTC
A similar problem was reported by a Debian user recently, it's reproducable with Evince 2.22.2 and Poppler 0.8.2:

"Sample 1:

This PDF: 
    http://www.tim-taylor.com/papers/thesis/thesis.pdf [5 MB]

renders fine with Evince.  However, when I select text with
the mouse, I see gibberish text in the highlighted region,
in a different font (some kind of sans serif).  The
gibberish seems to be the original text where each
character's encoding value is 2 less than it should be,
e.g. "Copy" shows up as "Anmw", with each character
positioned where the original was, so that a lot of
characters overlap each other since the font and characters
are different.  This occurs when selecting text of any font
in this document.

With most PDFs I get the expected behavior of the same text
being rendered, in the same font.

Except for ff/fi ligatures, pdftotext converts the text
portions of the PDF fine, and in Evince despite the
gibberish appearing on screen, the selected text copies to
clipboard fine (both PRIMARY upon select and CLIPBOARD upon
Ctrl+C).  Acrobat Reader 8 works fine when selecting text in
this PDF (also except ligatures).

Pdfinfo output:
     
    Title:          main.dvi
    Creator:        dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software
    Producer:       Acrobat Distiller Daemon 3.01 for Solaris 2.3 and later (SPARC)
    CreationDate:   Wed Aug 25 10:36:44 1999
    Tagged:         no
    Pages:          317
    Encrypted:      no
    Page size:      595 x 842 pts (A4)
    File size:      5344024 bytes
    Optimized:      no
    PDF version:    1.2


Sample 2:

I also discovered in /usr/share/X11/doc/fonts/fonts.pdf
(found in Debian package xorg-docs), that selecting works as
expected, except when highlighting Courier-font XML text.
The XML tag name and first word after tags (i.e. matching
perl regexp /(?<=[<>])\w+?(?=[<>]|$)/) disappears (as if
highlighting spaces) but the rest highlights fine;
everything copies to clipboard fine.  This is a "modern"
PDF-1.4 output by pdflatex.  This might be unrelated to the
issue above; could file a separate bugreport if that's
better."

The original bug report:
http://bugs.debian.org/481887
Comment 4 Andrey Paramonov 2008-10-23 17:42:12 UTC
I'm experiencing similar problem with Evince 2.22.2 (poppler 0.8.7) on Debian system, ru_RU.UTF-8 locale.

When selecting text in a PDF file, the selected text gets distorted. When copying the text to other applications (Emacs, GEdit) via X clipboard, the latin characters are copied nicely, but the cyrillics are replaced with umlauts.

Problematic file example:
http://zelmanov.ptep-online.com/ctan/lshort_russian.pdf

I'm ready to provide any additional info.

Andrey
Comment 5 Alexander Kojevnikov 2009-04-28 07:13:45 UTC
*** Bug 465030 has been marked as a duplicate of this bug. ***
Comment 6 Guillaume Brunerie 2009-05-10 20:59:07 UTC
The problem is still present in evince 2.26.1, and this is not with some PDFs that I'm experiencing problems but with almost all (in particular with all LaTeX generated PDFs).
I can give many others file causing problems.
It would be nice if this problem were resolved, this is very annoying.


Guillaume
Comment 7 Alex Ruddick 2010-03-27 16:24:04 UTC
Still present in 2.28.1 on Ubuntu.
Comment 8 Paul Sladen 2010-07-17 13:54:24 UTC
Freshly reported, in regards to debugging the new UbuntuSans beta fonts;  in the following PDF file (style guidelines), when text containing an 'fi' ligature is selected, the glyph is displayed as a square box instead:

  http://ubuntuone.com/p/7vH (direct link to a PDF file...)
Comment 9 Jaromír Cápík 2010-07-29 14:01:12 UTC
Invisible text when going 1 line up and down during text selection ...

http://tavvva.net/files/Evince-text-selection-bug.mp4

Since the original PDF document is a CV, I'll send it to the patch developer via E-mail only (if needed).
Comment 10 Jaromír Cápík 2010-07-29 14:04:47 UTC
I forgot to mention the viewer version .... it's 2.28.1
Comment 11 Dmitry Shachnev 2011-02-14 16:58:27 UTC
Isn't it this bug in poppler:
https://bugs.freedesktop.org/show_bug.cgi?id=6923 ?
Comment 12 José Aliste 2011-02-15 08:02:46 UTC
(In reply to comment #11)
> Isn't it this bug in poppler:
> https://bugs.freedesktop.org/show_bug.cgi?id=6923 ?

Yes, indeed. Thanks for pointing this out, since I was not aware of the minimal pdf Document showing the bug. I've attached a patch in the above bug that hopefully fixes the problem.
Comment 13 José Aliste 2011-02-15 17:28:23 UTC
Update, in the comments there are several, IMO unrelated bugs, and these are bugs in poppler. The relevants bugs are: 

Problems in selections due to not correctly changing the font:

https://bugs.freedesktop.org/show_bug.cgi?id=6923

Problems in selections and in text for some russian encoded pdfs:

https://bugs.freedesktop.org/show_bug.cgi?id=34300

Problems in selections where ligatures are present:

https://bugs.freedesktop.org/show_bug.cgi?id=34301

Some glyphs dissapear/reappear when moving the mouse while selecting text:

https://bugzilla.gnome.org/show_bug.cgi?id=640466


Please, CC yourself to the corresponding bug you are interested in.