Commit 11d6103d authored by Albert Astals Cid's avatar Albert Astals Cid

Annot: Use the new Dict::lookup function

Simplifies the code
parent 56dc35f2
......@@ -2823,14 +2823,8 @@ void AnnotFreeText::generateFreeTextAppearance()
error(errSyntaxWarning, -1, "Font subdictionary is not a dictionary");
} else {
// Get the font dictionary for the actual requested font
Object fontDictionary = fontResources.getDict()->lookupNF(da.getFontName().getName()).copy();
// Resolve reference, if necessary
Ref fontReference = {-1, -1};
if (fontDictionary.isRef()) {
fontReference = fontDictionary.getRef();
fontDictionary = fontDictionary.fetch(xref);
}
Ref fontReference;
Object fontDictionary = fontResources.getDict()->lookup(da.getFontName().getName(), &fontReference);
if (fontDictionary.isDict()) {
font = GfxFont::makeFont(xref, da.getFontName().getName(), fontReference, fontDictionary.getDict());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment