[Poppler-bugs] [Bug 75667] Incorrect value in ascent field of GfxFont

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Mar 2 22:30:31 PST 2014


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

vvort at yandex.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from vvort at yandex.ru ---
(In reply to comment #3)
> I don't know what i'm supposed to see in the pdf.

I don't know how many software are affected by this problem.
But LibreOffice do.

Here is instruction to how track this bug with LibreOffice:
1. Open PDF with LibreOffice Draw. You will see that underlines are crossing
the text. If you will not see, this means that my patch was commited. No need
to worry - bug is still there.
2. This happens because text is rendered slightly below it's actual position.
Navigate to \sdext\source\pdfimport\xpdfwrapper\pdfioutdev_gpl.cxx, function
PDFOutDev::drawChar(). There you can find function call
'state->textTransformDelta(0.0, state->getFont()->getAscent(), &x2, &y2 ); This
is transition from LibreOffice code to poppler code. And here getAscent()
returns incorrect value.
3. Incorrect value assigned here: \poppler\GfxFont.cc, precisely in this lines:
'if (builtinFont && embFontID.num < 0) { ascent = 0.001 * builtinFont->ascent;
...'. "Arial" font's property ascent gets value from "Helvetica"'s
builtinFont->ascent, which is incorrect (0.905 needed, 0.718 - what we get)

Switched state back to NEW. Switch back again if needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140303/016dba54/attachment.html>


More information about the Poppler-bugs mailing list