class_docstr: Font file plugin for the X11 PCF format.
class_docstr_tok: ["Font","file","plugin","for","the","X11","PCF","format","."]
code: def _load_bitmaps(self, metrics):
      #
      # bitmap data
  
      bitmaps = []
  
      fp, format, i16, i32 = self._getformat(PCF_BITMAPS)
  
      nbitmaps = i32(fp.read(4))
  
      if nbitmaps != len(metrics):
          raise OSError("Wrong number of bitmaps")
  
      offsets = []
      for i in range(nbitmaps):
          offsets.append(i32(fp.read(4)))
  
      bitmapSizes = []
      for i in range(4):
          bitmapSizes.append(i32(fp.read(4)))
  
      # byteorder = format & 4  # non-zero => MSB
      bitorder = format & 8  # non-zero => MSB
      padindex = format & 3
  
      bitmapsize = bitmapSizes[padindex]
      offsets.append(bitmapsize)
  
      data = fp.read(bitmapsize)
  
      pad = BYTES_PER_ROW[padindex]
      mode = "1;R"
      if bitorder:
          mode = "1"
  
      for i in range(nbitmaps):
          x, y, l, r, w, a, d, f = metrics[i]
          b, e = offsets[i], offsets[i + 1]
          bitmaps.append(
              Image.frombytes(
                  "1", (x, y), data[b:e], "raw", mode, pad(x)
              )
          )
  
      return bitmaps
  
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 5 for calling the PcfFontFile obj's underlying member method code with example usage: obj._load_bitmaps(metrics) and returns: bitmaps