fix for issue #1447 (#1462)
authorMichiharu Ariza <ariza@adobe.com>
Sat, 8 Dec 2018 04:49:39 +0000 (20:49 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 8 Dec 2018 04:49:39 +0000 (20:49 -0800)
Added case for OpCode_BaseFontName. This opcode in spec but practically unused.
Added a comment for default case which can't be hit

src/hb-ot-cff1-table.hh

index 10ce8ff..7a2c75e 100644 (file)
@@ -656,7 +656,7 @@ struct NameDictValues
   static inline enum NameDictValIndex name_op_to_index (OpCode op)
   {
     switch (op) {
-      default:
+      default: // can't happen - just make some compiler happy
       case OpCode_version:
        return version;
       case OpCode_Notice:
@@ -673,7 +673,9 @@ struct NameDictValues
        return postscript;
       case OpCode_FontName:
        return fontName;
-      }
+      case OpCode_BaseFontName:
+       return baseFontName;
+    }
   }
 
   unsigned int  values[ValCount];