class_docstr: Sets up printing to the given file. If ``fp`` is omitted,
  ``sys.stdout.buffer`` or ``sys.stdout`` is assumed.
class_docstr_tok: ["Sets","up","printing","to","the","given","file",".","If","``","fp","``","is","omitted",",","``","sys.stdout.buffer","``","or","``","sys.stdout","``","is","assumed","."]
docstr: Selects which font to use.
  
  :param font: A PostScript font name
  :param size: Size in points.
docstr_tok: ["Selects","which","font","to","use",".",":","param","font",":","A","PostScript","font","name",":","param","size",":","Size","in","points","."]
code: def setfont(self, font, size):
      """
      Selects which font to use.
  
      :param font: A PostScript font name
      :param size: Size in points.
      """
      font = bytes(font, "UTF-8")
      if font not in self.isofont:
          # reencode font
          self.fp.write(
              b"/PSDraw-%s ISOLatin1Encoding /%s E\n" % (font, font)
          )
          self.isofont[font] = 1
      # rough
      self.fp.write(b"/F0 %d /PSDraw-%s F\n" % (size, font))
  
file_path: pillow/src/PIL/PSDraw.py
imports: from __future__ import annotations
  import sys
  from .None import EpsImagePlugin
label_desc: Use image node_id 4 for calling the PSDraw obj's underlying member method code with example usage: obj.setfont(font, size) without return types