code: def name2unicode(name):
      
      if name in glyphname2unicode:
          return glyphname2unicode[name]
      if name.startswith('g') or name.startswith('a'):
          raise KeyError(name)
      if name.startswith('uni'):
          try:
              return chr(int(name[3:], 16))
          except ValueError:  # Not hexadecimal
              raise KeyError(name)
      m = STRIP_NAME.search(name)
      if not m:
          raise KeyError(name)
      return chr(int(m.group(0)))
docs: Fix pdfminer's name2unicode function
  
      Font cids that are mapped to names of the form /g123 seem to be, by convention
      characters with no corresponding Unicode entry. These can be subsetted fonts
      or symbolic fonts. There seems to be no way to map /g123 fonts to Unicode,
      barring a ToUnicode data structure.