Browse Source

LibPDF/CFF: Add a comment to CFF::parse_charset()

Nico Weber 1 year ago
parent
commit
c9d48bbca4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Userland/Libraries/LibPDF/Fonts/CFF.cpp

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

@@ -843,6 +843,8 @@ DeprecatedFlyString CFF::resolve_sid(SID sid, Vector<StringView> const& strings)
 PDFErrorOr<Vector<CFF::SID>> CFF::parse_charset(Reader&& reader, size_t glyph_count)
 PDFErrorOr<Vector<CFF::SID>> CFF::parse_charset(Reader&& reader, size_t glyph_count)
 {
 {
     // CFF spec, "13 Charsets"
     // CFF spec, "13 Charsets"
+
+    // Maps `GID - 1` to a SID (or CID, for CID-keyed fonts). The name of GID 0 is implicitly ".notdef".
     Vector<SID> names;
     Vector<SID> names;
     auto format = TRY(reader.try_read<Card8>());
     auto format = TRY(reader.try_read<Card8>());
     if (format == 0) {
     if (format == 0) {