code: def fontFamilyIndex(qFont, families):
      
      try:
          return families.index(qFont.family())
      except ValueError:
          if False and DEBUGGING:
              raise
          else:
              logger.warn("{} not found in font families, using default.".format(qFont.family()))
              return families.index(qFont.defaultFamily())
docs: Searches the index of qFont.family in the families list.
          If qFont.family() is not in the list, the index of qFont.defaultFamily() is returned.
          If that is also not present an error is raised.