class_docstr: PIL font wrapper
class_docstr_tok: ["PIL","font","wrapper"]
docstr: Returns length (in pixels) of given text.
  This is the amount by which following text should be offset.
  
  .. versionadded:: 9.2.0
docstr_tok: ["Returns","length","(","in","pixels",")","of","given","text",".","This","is","the","amount","by","which","following","text","should","be","offset",".","..","versionadded",":",":","9.2.0"]
code: def getlength(self, text, *args, **kwargs):
      """
      Returns length (in pixels) of given text.
      This is the amount by which following text should be offset.
  
      .. versionadded:: 9.2.0
      """
      _string_length_check(text)
      width, height = self.font.getsize(text)
      return width
  
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 5 for calling the ImageFont obj's underlying member method code with example usage: obj.getlength(text) and returns: width