[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
Sun Aug 19 09:27:34 UTC 2018


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

--- Comment #11 from Tobias Deiminger <haxtibal at posteo.de> ---
(In reply to oliver.sander from comment #7)
> > > - The text is moved a little bit towards the top of the page (notice how the
> > [snip]
> > translation). It's inaccurate. It was also wrong for the formerly hardcoded
> > Helvetica font, you just didn't notice it that much.
> 
> If it was wrong before, can we simply disregard the problem here and treat
> it in a separate bug report / patch?

I'd vote for doing it in another patch, to keep the scope here clear. The only
problem is, that we can't really file it as bug against poppler master, because
as long as only Helvetica is used, the bug never comes to light.

@Albert: Are you reading here? Any suggestion from your side?

I've looked at Helvetica metrics: Ascent=718, Descent=207 => 1000-207=793. So
with Helvetica there's always enough space for ascenders and capitals, even if
the assumption Ascent+Descent=1000 is buggy here, too.

The new patch should probably
1) use Ascent to calculate baseline offset from top margin
2) double check if the fixed scaling of ascent/descent by 0.001 in
GfxFont::readFontDescriptor is really correct. FontForge tells me that
IMPACT.ttf has em size of 2048 (while most fonts have 1000). Seems we should
scale with 1/2048 instead of 1/1000. That would explain the overly high Ascent
value I observe for /Impact.

-- 
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/20180819/04c030c4/attachment-0001.html>


More information about the Poppler-bugs mailing list