[Poppler-bugs] [Bug 46603] some glyphs not displayed when text is selected

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 3 21:27:44 PST 2012


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

--- Comment #8 from Adrian Johnson <ajohnson at redneon.com> 2012-03-03 21:27:44 PST ---
Created attachment 57993
  --> https://bugs.freedesktop.org/attachment.cgi?id=57993
fix selection of glyphs in actualtext

Thanks for these patches. I have started looking at some of the text related
bugs and the inability of TextOuputDev to understand the difference between
glyphs and characters is the cause of some of these bugs. The first patch is
very similar to the solution I had in mind. The first patch also fixes bug
9001.

Some comments on the first patch:

The following code in TextBlock::coalesce() needs fixing:
      if (word2->len == word0->len &&
          !memcmp(word2->text, word0->text,
              word0->len * sizeof(Unicode))) {
len need to be replaced with textLen.

I don't think addChar should be renamed to addChars. My understanding of the
code is that 'Char' is referring to the CharCodes and only one CharCode is
added per call.

I would move the surrogate decoding to TextWord:addChar() and do the decoding
as the unicode values are copied into the text array. This avoids having to
make a copy of the unicode array in TextPage::addChar().

Some comments on the second patch:

I don't like the way the second patch is mapping the replacement text to the
charcodes. I am attaching an alternative patch that distributes the replacement
text evenly across the charcodes.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list