docs: def init(width, height, title=None, fullscreen=False, renderer='SDL'):
      """Start the main console with the given width and height and return the
      root console.
  
      Call the consoles drawing functions.  Then remember to use L{tdl.flush} to
      make what's drawn visible on the console.
  
      Args:
          width (int): width of the root console (in tiles)
          height (int): height of the root console (in tiles)
          title (Optiona[Text]):
              Text to display as the window title.
  
              If left None it defaults to the running scripts filename.
          fullscreen (bool): Can be set to True to start in fullscreen mode.
          renderer (Text): Can be one of 'GLSL', 'OPENGL', or 'SDL'.
  
          Due to way Python works you're unlikely to see much of an
          improvement by using 'GLSL' over 'OPENGL' as most of the
          time Python is slow interacting with the console and the
          rendering itself is pretty fast even on 'SDL'.
  
      Returns:
          tdl.Console: The root console.
  
              Only what is drawn on the root console is
              what's visible after a call to :any:`tdl.flush`.
              After the root console is garbage collected, the window made by
              this function will close.
  
      .. seealso::
          :any:`Console` :any:`set_font`
      """
      RENDERERS = {'GLSL': 0, 'OPENGL': 1, 'SDL': 2}
      global _rootinitialized, _rootConsoleRef
      if not _fontinitialized: # set the default font to the one that comes with tdl
          set_font(_os.path.join(__path__[0], 'terminal8x8.png'),
                   None, None, True, True)
  
      if renderer.upper() not in RENDERERS:
          raise TDLError('No such render type "%s", expected one of "%s"' % (renderer, '", "'.join(RENDERERS)))
      renderer = RENDERERS[renderer.upper()]
  
      # If a console already exists then make a clone to replace it
      if _rootConsoleRef and _rootConsoleRef():
          # unhook the root console, turning into a regular console and deleting
          # the root console from libTCOD
          _rootConsoleRef()._root_unhook()
  
      if title is None: # use a default title
          if _sys.argv:
              # Use the script filename as the title.
              title = _os.path.basename(_sys.argv[0])
          else:
              title = 'python-tdl'
  
      _lib.TCOD_console_init_root(width, height, _encodeString(title), fullscreen, renderer)
  
      #event.get() # flush the libtcod event queue to fix some issues
      # issues may be fixed already
  
      event._eventsflushed = False
      _rootinitialized = True
      rootconsole = Console._newConsole(_ffi.NULL)
      _rootConsoleRef = _weakref.ref(rootconsole)
  
      return rootconsole