class_docstr: Font file plugin for the X11 PCF format.
class_docstr_tok: ["Font","file","plugin","for","the","X11","PCF","format","."]
code: def _load_encoding(self):
      # map character code to bitmap index
      encoding = [None] * 256
  
      fp, format, i16, i32 = self._getformat(PCF_BDF_ENCODINGS)
  
      firstCol, lastCol = i16(fp.read(2)), i16(fp.read(2))
      firstRow, lastRow = i16(fp.read(2)), i16(fp.read(2))
  
      i16(fp.read(2))  # default
  
      nencoding = (lastCol - firstCol + 1) * (lastRow - firstRow + 1)
  
      encodingOffsets = [i16(fp.read(2)) for _ in range(nencoding)]
  
      for i in range(firstCol, len(encoding)):
          try:
              encodingOffset = encodingOffsets[
                  ord(bytearray([i]).decode(self.charset_encoding))
              ]
              if encodingOffset != 0xFFFF:
                  encoding[i] = encodingOffset
          except UnicodeDecodeError:
              # character is not supported in selected encoding
              pass
  
      return encoding
  
file_path: pillow-simd/src/PIL/PcfFontFile.py
imports: import io
  from .None import FontFile, Image
  from ._binary import i8
  from ._binary import i16be
  from ._binary import i16le
  from ._binary import i32be
  from ._binary import i32le
label_desc: Use image node_id 6 for calling the PcfFontFile obj's underlying member method code with example usage: obj._load_encoding() and returns: encoding