class_docstr: PIL font wrapper
code: def _load_pilfont_data(self, file, image):
      # read PILfont header
      if file.readline() != b"PILfont\n":
          raise SyntaxError("Not a PILfont file")
      file.readline().split(b";")
      self.info = []  # FIXME: should be a dictionary
      while True:
          s = file.readline()
          if not s or s == b"DATA\n":
              break
          self.info.append(s)
  
      # read PILfont metrics
      data = file.read(256 * 20)
  
      # check image
      if image.mode not in ("1", "L"):
          raise TypeError("invalid font image mode")
  
      image.load()
  
      self.font = Image.core.font(image.im, data)
  
imports: import os
  import sys
  from .None import Image
  from ._util import isDirectory, isPath, py3
label_desc: Use image node_id 2 for calling the ImageFont obj's underlying member method code with example usage: obj._load_pilfont_data(file, image) without return types