<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#c8">Comment # 8</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:oliver.sander@tu-dresden.de" title="oliver.sander@tu-dresden.de">oliver.sander@tu-dresden.de</a>
</span></b>
<pre>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?</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>