code: def _load_vispy_font(face, bold, italic):
      # http://stackoverflow.com/questions/2703085/
      # how-can-you-load-a-font-ttf-from-a-file-using-core-text
      fname = _get_vispy_font_filename(face, bold, italic)
      url = cf.CFURLCreateWithFileSystemPath(
          None, CFSTR(fname), 0, False
      )
      # data_provider = quartz.CGDataProviderCreateWithURL(url)
      # cg_font = quartz.CGFontCreateWithDataProvider(data_provider)
      # font = ct.CTFontCreateWithGraphicsFont(cg_font, 12., None, None)
      array = ct.CTFontManagerCreateFontDescriptorsFromURL(url)
      desc = cf.CFArrayGetValueAtIndex(array, 0)
      font = ct.CTFontCreateWithFontDescriptor(desc, 12.0, None)
      cf.CFRelease(array)
      cf.CFRelease(url)
      if not font:
          raise RuntimeError("Couldn't load font: %s" % face)
      key = "%s-%s-%s" % (face, bold, italic)
      _font_dict[key] = font
      return font
  
file_path: vispy/vispy/util/fonts/_quartz.py
imports: import numpy
  from ctypes import byref, c_int32, c_byte
  from ...ext.cocoapy import cf, ct, quartz, CFRange, CFSTR, CGGlyph, UniChar, kCTFontFamilyNameAttribute, kCTFontBoldTrait, kCTFontItalicTrait, kCTFontSymbolicTrait, kCTFontTraitsAttribute, kCTFontAttributeName, kCGImageAlphaPremultipliedLast, kCFNumberSInt32Type, ObjCClass
  from ._vispy_fonts import _vispy_fonts, _get_vispy_font_filename
label_desc: Use image node_id 1 for calling a global function with example usage: _load_vispy_font(face, bold, italic) and returns: font