[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
Sat Aug 18 11:17:58 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=107584
--- Comment #8 from oliver.sander at tu-dresden.de ---
Here is some initial explanation of why moving the annotation in Okular causes
a crash: After the move, Okular calls the method TextAnnotation::setTextFont
with the argument
QFont( "Noto Sans,12,-1,0,50,0,0,0,0,0,Regular" )
Then, the method TextAnnotationPrivate::toAppearanceString is called to get an
appearance string from that. However, the method is only a stub:
GooString * TextAnnotationPrivate::toAppearanceString(const QFont &font)
{
GooString * s = GooString::format("/Invalid_font {0:d} Tf",
font.pointSize());
// TODO: Font family, style (bold, italic, ...) and pointSize as float
return s;
}
The actual crash then results because the font tag 'Invalid_font' cannot be
found in the font resource dictionary.
I'll modify the patch to not crash when the font tag cannot be found. However,
there are still a few things I don't understand, namely a) why is setTextFont
only called after the annotation has been moved, but not before, b) How do we
get the /Impact tag from that particular QFont object?
--
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/20180818/14a22cc3/attachment.html>
More information about the Poppler-bugs
mailing list