This adds in the Glyphicons Halflings Font/Iconset as an option for PHUIIconView along with a standard set of 10 colors. This will be a replacement for the standard action icon set in upcoming diffs, as well as obviously give us more flexibility, less KB, and less design resource time managing images.
Details
- Reviewers
epriestley btrahan - Commits
- Restricted Diffusion Commit
rP41ea90c686ef: Add Glyphicons Halflings Font and Examples
UIExamples, Diviner
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
What platforms use SVG, EOT, and TTF? Can we just use WOFF and whatever IE8 uses instead (EOT)?
My 5-minute effort to answer this question comes up with:
At least from these links, it looks like there's no browser we care about that doesn't support either EOT (IE8) or WOFF (everything else).
http://caniuse.com/woff
http://caniuse.com/eot
Here's a similar answer (TTF/SVG are old Android/iOS): http://stackoverflow.com/a/16978219/821226
So maybe ditch TTF/SVG?
We probably need to add a listing for EOT to CelerityResourceController::getSupportedResourceTypes() -- I wouldn't expect this to work in IE8 until then (does it actually work in IE8)?
I've been trying to get my ie box running today - haven't had much time. What you note though is what I understand it to be as well... but both Glyphicons and FontAwesome run all four files. So I'm missing something in that regard
Yeah, it seems all 4 are needed for the most complete coverage. That meaning, TTF does well with Android (WOFF just got supported there), EOT for IE8, WOFF for everything modern and SVG hits to hit all the little cracks like Opera.
Oh, those suffixes need to be added to CelerityResourcesOnDisk::getBinaryFileSuffixes().
I think all the fonts might be getting inlined with data URIs right now, which is why they work. Let me take a look at that code...
Hmm, they shouldn't be. I think what's actually happening is:
- we go to translate the resource URIs;
- we don't recognize them, so we don't touch them;
- the browser makes normal requests;
- lighttpd/apache/nginx serves them since they're real files on disk.
So this should be good to go with the getBinaryFileSuffixes() change plus a map regen.
should be interesting to see what happens. plan to slow rollout maybe just timeline at first, before pulling everything. removing the ‘icons’ sprite sheet is the main goal.