Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Bower repository and a Node.js customizer/builder for the iconic font WebHostingHub Glyphs

Notifications You must be signed in to change notification settings

gustavohenke/webhostinghub-glyphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b1d1f89 · Nov 22, 2014

History

35 Commits
Nov 22, 2014
Apr 10, 2014
Apr 10, 2014
Mar 9, 2014
Mar 10, 2014
Mar 9, 2014
Mar 9, 2014
Mar 15, 2014
Apr 4, 2014
Apr 3, 2014
Apr 10, 2014
Apr 10, 2014
Apr 3, 2014
Nov 22, 2014

Repository files navigation

WebHostingHub Glyphs customizer

Bower repository and a Node.js customizer/builder for the iconic font WebHostingHub Glyphs.

Dependency Status

Install

The repository is installable via Bower (d'oh!):

bower install webhostinghub-glyphs

...and maybe from NPM, for people who like to build a custom iconic font, which will allow you to use the whhglyphs or webhostinghub-glyphs commands in your CLI:

npm install -g webhostinghub-glyphs

When installing it globally, you'll have available 2 new commands: webhostinghub-glyphs and whhglyphs. They are the same thing.

Building and customizing

Run the commands below in order to build the complete font:

webhostinghub-glyphs

Optionally, you can pass a .txt or a .json file name to select only a few icons from the font and optionally rename them. This helps avoiding large font files (WHH Glyphs is a really large font bro!).

webhostinghub-glyphs file.txt
webhostinghub-glyphs file.json

.txt format

When using a .txt file to select your icons, each line must contain a valid icon name:

home
search
save
rss

This will only select .icon-home, .icon-search, .icon-save and .icon-rss.

To rename any icon, simply put whitespaces between the old name and the new name:

search magnifier
save

This way, .icon-magnifier and .icon-save will be made available.

.json format

A .json file must contain a single array, where each item is a valid icon name:

[
    "home",
    "search",
    "save",
    "rss"
]

This will only select .icon-home, .icon-search, .icon-save and .icon-rss.

To rename any icon, use an array, in the format [ old name, new name ]:

[
    [ "search", "magnifier" ],
    "save"
]

This way, .icon-magnifier and .icon-save will be made available.

When using .json files, comments are allowed, they will be striped:

[
    // Home icons
    "home",
    "search",
    "rss",

    // Content edit icons
    "save",
    "font"
]

Tasks done by this tool

The tasks done by the build script are:

  • Fix inconsistent glyph names in SVG font
  • Decode glyph names with HTML entities
  • Fix repeated icon names
  • Unmirror and unshift each icon
  • Download font package from Fontello API
  • Unzip it in the current working directory

License

MIT

About

Bower repository and a Node.js customizer/builder for the iconic font WebHostingHub Glyphs

Resources

Stars

Watchers

Forks

Packages

No packages published