<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Font disregarded in Freetext annotation with default appearance (DA) but without appearance stream (AP)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107584#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Font disregarded in Freetext annotation with default appearance (DA) but without appearance stream (AP)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107584">bug 107584</a>
from <span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span></b>
<pre>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 <a href="show_bug.cgi?id=107584#c0">comment #0</a>)
<span class="quote">> - 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).</span >
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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>