bmbrands / moodle-theme_elegance

This is the new official elegance repository
http://basbrands.nl
23 stars 12 forks source link

Roboto font looks bad in some browsers #46

Closed thepurpleblob closed 10 years ago

thepurpleblob commented 10 years ago

The Roboto font looks very rough in some browsers. We had a number of reports and struggled to reproduce it but finally managed it in Windows 7 with Firefox V30.0.

It's easy to miss but the characters have little dots at the top. moodlechars

thedannywahl commented 10 years ago

Does it happen on other sites with the same os and browser combo? I.e. go to fonts.google.com and preview it there.

thepurpleblob commented 10 years ago

No - it looks fine on fonts.google.com and the typecast page linked from there

DBezemer commented 10 years ago

The reason for this is that you only load the ttf and woff font. Only SVG fonts can be anti-aliased in Chrome/FireFox. Also, the Moodle font loader has some distinct issues, which makes loading these fonts from Google CDN recommended (also for speed reasons)

thepurpleblob commented 10 years ago

So where does this leave us? The font seems to be specified in quite a few places in the CSS. Would it be possible to have an option in the settings to disable web-fonts (if they are causing bother)?

thedannywahl commented 10 years ago

we can add the SVG option- that's easy enough. I don't think it's a good option to load them directly from from CDN, unfortunately. For the vast majority of sites this is a good thing- but for schools with intranet-only access - of which there are a lot, and for schools in Mainland China (of which we have 7 clients) and other "restricted" locales CDNs actually make it worse.

Have you ever seen a page take 7 minutes to load because of DNS poisioning to fonts.google.com? Not fun :/

Moodle font loader issues shouldn't be worked around- they should be fixed.

@thepurpleblob: all CSS calls to the font should have a fallback, so if you remove the original declaration then the rest of the rules should just "work".

@TODO: add svg versions of fonts.

thedannywahl commented 10 years ago

fixed by 75c7fdaa5e462b21224ad806234a46ed7fa3470b