code: def default(self, obj):
      if isinstance(obj, Font):
          return {
              "__gradio_font__": True,
              "name": obj.name,
              "class": "google"
              if isinstance(obj, GoogleFont)
              else "font",
          }
      # Let the base class default method raise the TypeError
      return json.JSONEncoder.default(self, obj)
  
file_path: gradio/gradio/themes/utils/fonts.py
imports: from __future__ import annotations
  import json
  from typing import Iterable
label_desc: Use image node_id 1 for calling the FontEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: json, dict