{"action":"created","issue":{"url":"https://api.github.com/repos/DMOJ/site/issues/146","labels_url":"https://api.github.com/repos/DMOJ/site/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/DMOJ/site/issues/146/comments","events_url":"https://api.github.com/repos/DMOJ/site/issues/146/events","html_url":"https://github.com/DMOJ/site/issues/146","id":67999218,"number":146,"title":"SVG math","user":{"login":"Xyene","id":1403503,"avatar_url":"https://avatars.githubusercontent.com/u/1403503?v=3","gravatar_id":"","url":"https://api.github.com/users/Xyene","html_url":"https://github.com/Xyene","followers_url":"https://api.github.com/users/Xyene/followers","following_url":"https://api.github.com/users/Xyene/following{/other_user}","gists_url":"https://api.github.com/users/Xyene/gists{/gist_id}","starred_url":"https://api.github.com/users/Xyene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xyene/subscriptions","organizations_url":"https://api.github.com/users/Xyene/orgs","repos_url":"https://api.github.com/users/Xyene/repos","events_url":"https://api.github.com/users/Xyene/events{/privacy}","received_events_url":"https://api.github.com/users/Xyene/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DMOJ/site/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/DMOJ/site/labels/optimization","name":"optimization","color":"f7c6c7"},{"url":"https://api.github.com/repos/DMOJ/site/labels/ui","name":"ui","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-13T03:51:45Z","updated_at":"2015-04-14T02:45:08Z","closed_at":null,"body":"Currently Mathtex is used to generate PNG math that is displayed before Mathjax runs. The generated PNGs look pixelated, so it would be a great UX enhancement to display SVG math instead, falling back to PNG when the browser does not support SVG.\r\n\r\nTo generate the SVGs, we could:\r\n* Use Mathjax off Node.js\r\n* Modify Mathtex to use `dvisvgm` instead of `dvipng` for generating SVGs\r\n\r\nTo fallback to PNGs where SVGs are not supported, we could:\r\n* Use some nasty hacks: https://css-tricks.com/svg-fallbacks/\r\n* Detect UA from math url and serve SVG/PNG based off that (does not play nice with CloudFlare caching)\r\n* Serve a different URL depending on whether the browser is capable of rendering SVGs"},"comment":{"url":"https://api.github.com/repos/DMOJ/site/issues/comments/92569020","html_url":"https://github.com/DMOJ/site/issues/146#issuecomment-92569020","issue_url":"https://api.github.com/repos/DMOJ/site/issues/146","id":92569020,"user":{"login":"quantum5","id":461885,"avatar_url":"https://avatars.githubusercontent.com/u/461885?v=3","gravatar_id":"","url":"https://api.github.com/users/quantum5","html_url":"https://github.com/quantum5","followers_url":"https://api.github.com/users/quantum5/followers","following_url":"https://api.github.com/users/quantum5/following{/other_user}","gists_url":"https://api.github.com/users/quantum5/gists{/gist_id}","starred_url":"https://api.github.com/users/quantum5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantum5/subscriptions","organizations_url":"https://api.github.com/users/quantum5/orgs","repos_url":"https://api.github.com/users/quantum5/repos","events_url":"https://api.github.com/users/quantum5/events{/privacy}","received_events_url":"https://api.github.com/users/quantum5/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T02:45:08Z","updated_at":"2015-04-14T02:45:08Z","body":"This conditional SVG thing isn't so good for a cache..."}}