class_docstr: FreeType font wrapper (requires _imagingft service)
class_docstr_tok: ["FreeType","font","wrapper","(","requires","_imagingft","service",")"]
docstr: Create a copy of this FreeTypeFont object,
  using any specified arguments to override the settings.
  
  Parameters are identical to the parameters used to initialize this
  object.
  
  :return: A FreeTypeFont object.
docstr_tok: ["Create","a","copy","of","this","FreeTypeFont","object",",","using","any","specified","arguments","to","override","the","settings",".","Parameters","are","identical","to","the","parameters","used","to","initialize","this","object",".",":","return",":","A","FreeTypeFont","object","."]
code: def font_variant(
      self,
      font=None,
      size=None,
      index=None,
      encoding=None,
      layout_engine=None,
  ):
      """
      Create a copy of this FreeTypeFont object,
      using any specified arguments to override the settings.
  
      Parameters are identical to the parameters used to initialize this
      object.
  
      :return: A FreeTypeFont object.
      """
      if font is None:
          try:
              font = BytesIO(self.font_bytes)
          except AttributeError:
              font = self.path
      return FreeTypeFont(
          font=font,
          size=self.size if size is None else size,
          index=self.index if index is None else index,
          encoding=self.encoding if encoding is None else encoding,
          layout_engine=layout_engine or self.layout_engine,
      )
  
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 10 for calling the FreeTypeFont obj's underlying member method code with example usage: obj.font_variant(font, size, index, encoding, layout_engine) and returns: FreeTypeFont