class_docstr: PIL font wrapper
class_docstr_tok: ["PIL","font","wrapper"]
docstr: Create a bitmap for the text.
  
  If the font uses antialiasing, the bitmap should have mode ``L`` and use a
  maximum value of 255. Otherwise, it should have mode ``1``.
  
  :param text: Text to render.
  :param mode: Used by some graphics drivers to indicate what mode the
               driver prefers; if empty, the renderer may return either
               mode. Note that the mode is always a string, to simplify
               C-level implementations.
  
               .. versionadded:: 1.1.5
  
  :return: An internal PIL storage memory instance as defined by the
           :py:mod:`PIL.Image.core` interface module.
docstr_tok: ["Create","a","bitmap","for","the","text",".","If","the","font","uses","antialiasing",",","the","bitmap","should","have","mode","``","L","``","and","use","a","maximum","value","of","255",".","Otherwise",",","it","should","have","mode","``","1","``",".",":","param","text",":","Text","to","render",".",":","param","mode",":","Used","by","some","graphics","drivers","to","indicate","what","mode","the","driver","prefers",";","if","empty",",","the","renderer","may","return","either","mode",".","Note","that","the","mode","is","always","a","string",",","to","simplify","C-level","implementations",".","..","versionadded",":",":","1.1.5",":","return",":","An","internal","PIL","storage","memory","instance","as","defined","by","the",":","py",":","mod",":","`","PIL.Image.core","`","interface","module","."]
code: def getmask(self, text, mode="", *args, **kwargs):
      """
      Create a bitmap for the text.
  
      If the font uses antialiasing, the bitmap should have mode ``L`` and use a
      maximum value of 255. Otherwise, it should have mode ``1``.
  
      :param text: Text to render.
      :param mode: Used by some graphics drivers to indicate what mode the
                   driver prefers; if empty, the renderer may return either
                   mode. Note that the mode is always a string, to simplify
                   C-level implementations.
  
                   .. versionadded:: 1.1.5
  
      :return: An internal PIL storage memory instance as defined by the
               :py:mod:`PIL.Image.core` interface module.
      """
      return self.font.getmask(text, mode)
  
imports: import base64
  import os
  import sys
  import warnings
  from enum import IntEnum
  from io import BytesIO
  from .None import Image
  from ._util import is_directory, is_path
label_desc: Use image node_id 3 for calling the ImageFont obj's underlying member method code with example usage: obj.getmask(text, mode) and returns: self