theme_bootstrap
theme_bootstrap copied to clipboard
Moodle 2.9 supports .woff2 fonts for glyphicon
In 2.9 the [[font:]] stuff in moodle will serve .woff2 font files to browsers that support it. Upstream Bootstrap has a .woff2 file since about 10 months ago. This is smaller and therefore loads faster for users.
There's also some newer icons, in version 1.9 of glyphicons. Not sure if the one in Bootstrap is up to date, I had to update the fonts in Snap.
The themetester page /admin/tool/themetester/bs_components.php lets you quickly check if all the icons are there, in Snap we were missing the last few rows.
Cool I'll check if I can update. Wow where's that themetester page from? I dont have it on my install
You can get it here:
https://github.com/davidscotson/moodle-tool_themetester
Though I'm not 100% sure that's the latest version, I thought our internal one had been pushed publicly elsewhere but maybe I'm wrong about that.
I'm the culprit that got woff2 support into core, so blame me!
Oh right! Yep kinda works. Just had to rewrite get_source_output() and get_html_output() because they conflict with the totara element library. But that was easy to change.. Works fine :) And yes missing some icons so will update!
Yeah, those functions, and a few other bits got fixed (well, basically deleted) in the internal copy, I'll push it out on a moodlerooms github at some point and announce it on Slack.