This commit is contained in:
Kovid Goyal 2019-07-27 11:39:43 +05:30
parent b6c8d9da5e
commit 316d0c35a1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -399,6 +399,7 @@ dedup_type3_fonts(PDFDoc *self, PyObject *args) {
PdfVecObjects &objects = self->doc->GetObjects(); PdfVecObjects &objects = self->doc->GetObjects();
for (auto &k : objects) { for (auto &k : objects) {
if (!k->IsDictionary()) continue;
const PdfDictionary &dict = k->GetDictionary(); const PdfDictionary &dict = k->GetDictionary();
if (dictionary_has_key_name(dict, PdfName::KeyType, "Font")) { if (dictionary_has_key_name(dict, PdfName::KeyType, "Font")) {
const std::string &font_type = dict.GetKey(PdfName::KeySubtype)->GetName().GetName(); const std::string &font_type = dict.GetKey(PdfName::KeySubtype)->GetName().GetName();