code: def get_font_from_data(fontdata):
      
  
      textfont = get_default_font()
  
      if fontdata != "":
          nativefontinfo = wx.NativeFontInfo()
          nativefontinfo.FromString(fontdata)
  
          # OS X does not like a PointSize of 0
          # Therefore, it is explicitly set to the system default font point size
  
          if not nativefontinfo.GetPointSize():
              nativefontinfo.SetPointSize(get_default_font().GetPointSize())
  
          textfont.SetNativeFontInfo(nativefontinfo)
  
      return textfont
docs: Returns wx.Font from fontdata string