Explorar o código

LibPDF/CFF: Add enum values for CID-keyed font top dict entries

No behavior change.
Nico Weber hai 1 ano
pai
achega
6ebddab448

+ 10 - 0
Userland/Libraries/LibPDF/Fonts/CFF.cpp

@@ -229,6 +229,16 @@ PDFErrorOr<NonnullRefPtr<CFF>> CFF::create(ReadonlyBytes const& cff_bytes, RefPt
                 }));
                 }));
                 break;
                 break;
             }
             }
+            case TopDictOperator::CIDFontVersion:
+            case TopDictOperator::CIDFontRevision:
+            case TopDictOperator::CIDFontType:
+            case TopDictOperator::CIDCount:
+            case TopDictOperator::UIDBase:
+            case TopDictOperator::FDArray:
+            case TopDictOperator::FDSelect:
+            case TopDictOperator::FontName:
+                // Keys for CID-keyed fonts that we don't need, at least at the moment.
+                break;
             default:
             default:
                 dbgln("CFF: Unhandled top dict entry {}", static_cast<int>(op));
                 dbgln("CFF: Unhandled top dict entry {}", static_cast<int>(op));
             }
             }

+ 11 - 0
Userland/Libraries/LibPDF/Fonts/CFF.h

@@ -47,6 +47,17 @@ private:
         PostScript,
         PostScript,
         BaseFontName,
         BaseFontName,
         BaseFontBlend,
         BaseFontBlend,
+
+        // CFF spec, "Table 10 CIDFont Operator Extensions"
+        RegistryOrderingSupplement = (12 << 8 | 30),
+        CIDFontVersion,
+        CIDFontRevision,
+        CIDFontType,
+        CIDCount,
+        UIDBase,
+        FDArray,
+        FDSelect,
+        FontName,
     };
     };
 
 
     // CFF spec, "Table 23 Private DICT Operators"
     // CFF spec, "Table 23 Private DICT Operators"