[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:08:11 UTC 2018


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

--- Comment #10 from Tobias Deiminger <haxtibal at posteo.de> ---
(In reply to oliver.sander from comment #8)
> a) why is setTextFont only called after the annotation has been moved,
> but not before
Document load and page render are read only operations, no annotation setters
are required there. But when you modify the slightest bit of an annotation, the
whole okular annotation model is synced to poppler using the various setters.
Thereby we discard the original appearance. That's long existing okular/poppler
behavior (and has some related bugs).

> b) How do we get the /Impact tag from that particular QFont object?
That'll get a long story, hopefully out of scope of this patch. Initially there
won't be a QFont for Impact at all, because available QFonts are those found by
Qt on your system. E.g., IMPACT.ttf is available on Windows, but typically not
on Linux. We can only render it because IMPACT.ttf got embedded into the PDF by
Adobe Reader. Maybe we can register a new QFont for the embedded font with
QFontDatabase::addApplicationFontFromData [0]. Next problem is, that we can't
get PostScript name (QFont::family != PostScript name), and we can't get
filename from a QFont.

http://doc.qt.io/qt-5/qfontdatabase.html#addApplicationFontFromData

(In reply to oliver.sander from comment #9)
> Not surprising though, moving the annotation makes
> the font switch to the default font again.
IMO that's as good as it gets for now. Preserving the original font upon
modification via Qt frontend can be targeted in a future patch.

-- 
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/287a225e/attachment-0001.html>


More information about the Poppler-bugs mailing list