[Poppler-bugs] [Bug 107584] Font disregarded in Freetext annotation with default appearance (DA) but without appearance stream (AP)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 17 21:55:34 UTC 2018


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

--- Comment #6 from Tobias Deiminger <haxtibal at posteo.de> ---
Moving/resizing the FreeText annotation from the test document in Okular causes
a crash for me with this patch. Can you reproduce it?

(In reply to oliver.sander from comment #0)
> - The text is moved a little bit towards the top of the page (notice how the
>   top part of "This is a test" is cut off).
As far as I can tell by now, we mustn't relate getDescent() to fontSize when
calculating the baseline offset from top of the bounding box (see Tm + Td
translation). It's inaccurate. It was also wrong for the formerly hardcoded
Helvetica font, you just didn't notice it that much. While font size relates to
the em square, ascent+descent is more or less out of the em square. How much
out depends on the font. I don't know which metrics to use instead, have to
learn more. What would you expect to fit vertically exact in the first line
(and so determines the baseline offset from top)?
- capital glyphs from font (/CapHeight)?
- the glyph with highest ascender in the whole font (/Ascent), potentially much
higher then capital glyphs?
- the highest glyph that takes actually part in the first line?
- something else?
- huh?

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


More information about the Poppler-bugs mailing list