{"action":"created","issue":{"url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/20","labels_url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/20/comments","events_url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/20/events","html_url":"https://github.com/zachleat/fontfaceonload/issues/20","id":76423536,"number":20,"title":"Fail load detection when url from google includes several weights","user":{"login":"nobuti","id":1366843,"avatar_url":"https://avatars.githubusercontent.com/u/1366843?v=3","gravatar_id":"","url":"https://api.github.com/users/nobuti","html_url":"https://github.com/nobuti","followers_url":"https://api.github.com/users/nobuti/followers","following_url":"https://api.github.com/users/nobuti/following{/other_user}","gists_url":"https://api.github.com/users/nobuti/gists{/gist_id}","starred_url":"https://api.github.com/users/nobuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobuti/subscriptions","organizations_url":"https://api.github.com/users/nobuti/orgs","repos_url":"https://api.github.com/users/nobuti/repos","events_url":"https://api.github.com/users/nobuti/events{/privacy}","received_events_url":"https://api.github.com/users/nobuti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T17:03:58Z","updated_at":"2015-06-15T14:33:09Z","closed_at":null,"body":"I'm trying to apply these scenario from @bevacqua performance workshop: \r\nhttps://github.com/bevacqua/perfschool/tree/master/exercises/using_a_font_loader\r\n\r\nThat solution works like a charm... if the url has the defaults weights. I'm trying without success apply the same logic when working with a subset of fonts like these: `https://fonts.googleapis.com/css?family=Lato:700,900|Bitter:400italic`.\r\n\r\nWith this script:\r\n```\r\n  var ffol = global.FontFaceOnload;\r\n  var html = document.documentElement;\r\n\r\n  function watch (family) {\r\n    function loaded () {\r\n      html.className += ' ok-' + family.toLowerCase();\r\n    }\r\n\r\n    function notLoaded() {\r\n      console.error(\"Error loading \" + family + \" font.\");\r\n    }\r\n\r\n    ffol(family, {\r\n      timeout: 10000,\r\n      success: loaded,\r\n      error: notLoaded \r\n    });\r\n  }\r\n\r\n  watch('Lato');\r\n  watch('Bitter');\r\n```\r\nthe fail callback is always thrown. Am I missing something?\r\n"},"comment":{"url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/comments/112090647","html_url":"https://github.com/zachleat/fontfaceonload/issues/20#issuecomment-112090647","issue_url":"https://api.github.com/repos/zachleat/fontfaceonload/issues/20","id":112090647,"user":{"login":"zrothauser","id":4950114,"avatar_url":"https://avatars.githubusercontent.com/u/4950114?v=3","gravatar_id":"","url":"https://api.github.com/users/zrothauser","html_url":"https://github.com/zrothauser","followers_url":"https://api.github.com/users/zrothauser/followers","following_url":"https://api.github.com/users/zrothauser/following{/other_user}","gists_url":"https://api.github.com/users/zrothauser/gists{/gist_id}","starred_url":"https://api.github.com/users/zrothauser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrothauser/subscriptions","organizations_url":"https://api.github.com/users/zrothauser/orgs","repos_url":"https://api.github.com/users/zrothauser/repos","events_url":"https://api.github.com/users/zrothauser/events{/privacy}","received_events_url":"https://api.github.com/users/zrothauser/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T14:33:09Z","updated_at":"2015-06-15T14:33:09Z","body":"@nobuti, try specifying a weight and style in the options, if you're not loading the 400/normal version of the font. I ran into this issue today, and specifying a weight of 700 was necessary for one where I didn't need the 400 weight. "}}