{"action":"created","issue":{"url":"https://api.github.com/repos/sabas/genfontgl/issues/5","repository_url":"https://api.github.com/repos/sabas/genfontgl","labels_url":"https://api.github.com/repos/sabas/genfontgl/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/sabas/genfontgl/issues/5/comments","events_url":"https://api.github.com/repos/sabas/genfontgl/issues/5/events","html_url":"https://github.com/sabas/genfontgl/pull/5","id":137098728,"number":5,"title":"make output directories more like gl style usage","user":{"login":"tobinbradley","id":1250538,"avatar_url":"https://avatars.githubusercontent.com/u/1250538?v=3","gravatar_id":"","url":"https://api.github.com/users/tobinbradley","html_url":"https://github.com/tobinbradley","followers_url":"https://api.github.com/users/tobinbradley/followers","following_url":"https://api.github.com/users/tobinbradley/following{/other_user}","gists_url":"https://api.github.com/users/tobinbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/tobinbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobinbradley/subscriptions","organizations_url":"https://api.github.com/users/tobinbradley/orgs","repos_url":"https://api.github.com/users/tobinbradley/repos","events_url":"https://api.github.com/users/tobinbradley/events{/privacy}","received_events_url":"https://api.github.com/users/tobinbradley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-28T21:38:22Z","updated_at":"2016-02-29T00:36:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sabas/genfontgl/pulls/5","html_url":"https://github.com/sabas/genfontgl/pull/5","diff_url":"https://github.com/sabas/genfontgl/pull/5.diff","patch_url":"https://github.com/sabas/genfontgl/pull/5.patch"},"body":"I think this is the last one, and you may not want this for your original use case, but...\r\n\r\nThis uses regex to make the output folder \"Open Sans Regular\" instead of \"OpenSansRegular\". This makes it a lot more intuitive for using font names in style.json (it's how MapBox names its fonts)."},"comment":{"url":"https://api.github.com/repos/sabas/genfontgl/issues/comments/189980715","html_url":"https://github.com/sabas/genfontgl/pull/5#issuecomment-189980715","issue_url":"https://api.github.com/repos/sabas/genfontgl/issues/5","id":189980715,"user":{"login":"tobinbradley","id":1250538,"avatar_url":"https://avatars.githubusercontent.com/u/1250538?v=3","gravatar_id":"","url":"https://api.github.com/users/tobinbradley","html_url":"https://github.com/tobinbradley","followers_url":"https://api.github.com/users/tobinbradley/followers","following_url":"https://api.github.com/users/tobinbradley/following{/other_user}","gists_url":"https://api.github.com/users/tobinbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/tobinbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobinbradley/subscriptions","organizations_url":"https://api.github.com/users/tobinbradley/orgs","repos_url":"https://api.github.com/users/tobinbradley/repos","events_url":"https://api.github.com/users/tobinbradley/events{/privacy}","received_events_url":"https://api.github.com/users/tobinbradley/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T00:36:24Z","updated_at":"2016-02-29T00:36:24Z","body":"Here's where I get a bit out of my depth. Most (?) TTF fonts come kinda like this: OpenSans-Bold.ttf. If you just did the hyphen, you'd end up with 'OpenSans Bold'.  The regex inserts a space after every camel case to make it 'Open Sans Bold' after the hyphen is removed, which is normally how you'd see it.\r\n\r\nThe TTF naming convention seems to be [SomeFontName]-[Style], and the OS presents the font to the user as the camel cased part with spaces where the camels are. But I don't know that for sure, just seems to be the pattern.\r\n\r\nSo...I dunno. In Mapbox style files you see \"Open Sans Semibold\", \"Arial Unicode MS Bold\", \"DIN Offc Pro Italic\", stuff like that, so that's how they have their font folders. But I don't think there's a \"correct\" answer here. You could leave it as is and put \"OpenSansBold\" as your font in the mapbox gl style and it would work fine. Just looks funny."}}