class_docstr: FreeType font wrapper (requires _imagingft service)
docstr: Returns width and height (in pixels) of given text if rendered in font with
  provided direction, features, and language.
  
  :param text: Text to measure.
  
  :param direction: Direction of the text. It can be 'rtl' (right to
                    left), 'ltr' (left to right) or 'ttb' (top to bottom).
                    Requires libraqm.
  
                    .. versionadded:: 4.2.0
  
  :param features: A list of OpenType font features to be used during text
                   layout. This is usually used to turn on optional
                   font features that are not enabled by default,
                   for example 'dlig' or 'ss01', but can be also
                   used to turn off default font features for
                   example '-liga' to disable ligatures or '-kern'
                   to disable kerning.  To get all supported
                   features, see
                   https://docs.microsoft.com/en-us/typography/opentype/spec/featurelist
                   Requires libraqm.
  
                   .. versionadded:: 4.2.0
  
  :param language: Language of the text. Different languages may use
                   different glyph shapes or ligatures. This parameter tells
                   the font which language the text is in, and to apply the
                   correct substitutions as appropriate, if available.
                   It should be a `BCP 47 language code
                   <https://www.w3.org/International/articles/language-tags/>`
                   Requires libraqm.
  
                   .. versionadded:: 6.0.0
  
  :param stroke_width: The width of the text stroke.
  
                   .. versionadded:: 6.2.0
  
  :return: (width, height)
docstr_tok: ["Returns","width","and","height","(","in","pixels",")","of","given","text","if","rendered","in","font","with","provided","direction",",","features",",","and","language",".",":","param","text",":","Text","to","measure",".",":","param","direction",":","Direction","of","the","text",".","It","can","be","'rtl","'","(","right","to","left",")",",","'ltr","'","(","left","to","right",")","or","'ttb","'","(","top","to","bottom",")",".","Requires","libraqm",".","..","versionadded",":",":","4.2.0",":","param","features",":","A","list","of","OpenType","font","features","to","be","used","during","text","layout",".","This","is","usually","used","to","turn","on","optional","font","features","that","are","not","enabled","by","default",",","for","example","'dlig","'","or","'ss01","'",",","but","can","be","also","used","to","turn","off","default","font","features","for","example","'-liga","'","to","disable","ligatures","or","'-kern'","to","disable","kerning",".","To","get","all","supported","features",",","see","https",":","\/\/docs.microsoft.com\/en-us\/typography\/opentype\/spec\/featurelist","Requires","libraqm",".","..","versionadded",":",":","4.2.0",":","param","language",":","Language","of","the","text",".","Different","languages","may","use","different","glyph","shapes","or","ligatures",".","This","parameter","tells","the","font","which","language","the","text","is","in",",","and","to","apply","the","correct","substitutions","as","appropriate",",","if","available",".","It","should","be","a","`","BCP","47","language","code","<","https",":","\/\/www.w3.org\/International\/articles\/language-tags\/",">","`","Requires","libraqm",".","..","versionadded",":",":","6.0.0",":","param","stroke_width",":","The","width","of","the","text","stroke",".","..","versionadded",":",":","6.2.0",":","return",":","(","width",",","height",")"]
code: def getsize(
      self,
      text,
      direction=None,
      features=None,
      language=None,
      stroke_width=0,
  ):
      """
      Returns width and height (in pixels) of given text if rendered in font with
      provided direction, features, and language.
  
      :param text: Text to measure.
  
      :param direction: Direction of the text. It can be 'rtl' (right to
                        left), 'ltr' (left to right) or 'ttb' (top to bottom).
                        Requires libraqm.
  
                        .. versionadded:: 4.2.0
  
      :param features: A list of OpenType font features to be used during text
                       layout. This is usually used to turn on optional
                       font features that are not enabled by default,
                       for example 'dlig' or 'ss01', but can be also
                       used to turn off default font features for
                       example '-liga' to disable ligatures or '-kern'
                       to disable kerning.  To get all supported
                       features, see
                       https://docs.microsoft.com/en-us/typography/opentype/spec/featurelist
                       Requires libraqm.
  
                       .. versionadded:: 4.2.0
  
      :param language: Language of the text. Different languages may use
                       different glyph shapes or ligatures. This parameter tells
                       the font which language the text is in, and to apply the
                       correct substitutions as appropriate, if available.
                       It should be a `BCP 47 language code
                       <https://www.w3.org/International/articles/language-tags/>`
                       Requires libraqm.
  
                       .. versionadded:: 6.0.0
  
      :param stroke_width: The width of the text stroke.
  
                       .. versionadded:: 6.2.0
  
      :return: (width, height)
      """
      size, offset = self.font.getsize(
          text, direction, features, language
      )
      return (
          size[0] + stroke_width * 2 + offset[0],
          size[1] + stroke_width * 2 + offset[1],
      )
  
imports: import os
  import sys
  from .None import Image
  from ._util import isDirectory, isPath, py3
label_desc: Use image node_id 5 for calling the FreeTypeFont obj's underlying member method code with example usage: obj.getsize(text, direction, features, language, stroke_width) and returns: unknown,  unknown