Allow resources with no /Font field, they won't cause any problem as long as no call to Tf (to load a font) is made

This commit is contained in:
Tissevert 2020-02-10 17:41:44 +01:00
parent 9f1b1afafe
commit 195446e653

View file

@ -64,8 +64,7 @@ getFontDictionary :: Dictionary -> T Dictionary
getFontDictionary pageDict =
key "Resources" pageDict
//= getResource
\\= key "Font"
>>= getResource
>>= either (const $ return Map.empty) getResource . key "Font"
cache :: (ObjectId -> T Font) -> ObjectId -> T Font
cache loader objectId =