code: def __init__(self, fp):
      FontFile.FontFile.__init__(self)
  
      s = fp.readline()
      if s[:13] != b"STARTFONT 2.1":
          raise SyntaxError("not a valid BDF file")
  
      props = {}
      comments = []
  
      while True:
          s = fp.readline()
          if not s or s[:13] == b"ENDPROPERTIES":
              break
          i = s.find(b" ")
          props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii")
          if s[:i] in [b"COMMENT", b"COPYRIGHT"]:
              if s.find(b"LogicalFontDescription") < 0:
                  comments.append(s[i + 1 : -1].decode("ascii"))
  
      while True:
          c = bdf_char(fp)
          if not c:
              break
          id, ch, (xy, dst, src), im = c
          if 0 <= ch < len(self.glyph):
              self.glyph[ch] = xy, dst, src, im
  
imports: from __future__ import print_function
  from .None import FontFile, Image
label_desc: Use image node_id 1 to create a new BdfFontFile object from inherited base classes: FontFile with example: obj = BdfFontFile(fp)