Giter Club home page Giter Club logo

devopicons's Introduction

DevOpicons: Optimised Devicons

Jenkins, before and after he lost weight | 731 โ‡’ 244 points

This is simply a heavily-optimised version of the Devicons font, created by Theodore Vorillas. All credit for the original icon vectors goes to him and his project's contributors; I've simply cleaned up the typeface by annihilating excess geometry, clearing duplicate control points, and basically just being a meticulous prick.

Result: 17 KBs knocked off the WOFF's filesize. That's a pretty impressive reduction when you consider the format's already compressed.

Size fixes

Aside from optimising the geometry of the vectors, I've also scaled them so they fit their containing canvas. Having "breathing space" in an icon font tends to be helpful only when the final design is known in advance. If mixed with other icon fonts of varying margin sizes, it can lead to disproportionate sizes and a whole lot of unsavoury CSS tweaking for different font families.

For instance, consider this:

Comparison of metrics

You've probably dealt with this before. This leads to a lot of dishonest measurements in the inspector tools when ascertaining the calculated width and height of icons in the DOM. When implementing pixel-perfect design, this can become a bit of a headache.

The fix is easy - eliminate the margins altogether. Leave tweaking of space to the developer, because they're the ones dealing with making their design look pretty. You aren't. Letting icons fill their canvas results in more honest metrics:

Comparison of metrics

Word of caution

If an icon's dimensions are landscape-shaped, avoid fitting it to a rectangular canvas:

Good and bad, not in that order

Otherwise, you wind up with this:

Bad and bad, in that order

Because remember, em and rem units are scaled relative to text height. So avoid letting that aspect ratio exceed 1.0!

Ramble, ramble, ramble

I really don't know when to stop typing. Anyway, enough typography lessons. Enjoy the improved filesize.

devopicons's People

Contributors

alhadis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.