Return to site

Create Custom Font Icons

broken image
Create Custom Font Icons

Fonts can be saved in different file formats: OTF, TTF and SVG (and some more).

You need to create a new folder there and name it fonts. Next, you need to upload the contents of the icon fonts folder to the fonts directory on your web hosting server. Now you are ready to load icon fonts into your WordPress theme. Simply add this code to your theme's functions.php file or in a site-specific plugin. The most popular font for creating CSS-based icons is Font Awesome. This font and icon toolkit was created by Dave Gandy, originally for Twitter Bootstrap, and is available free under SIL Open Font License 1.1, Creative Commons Attribution 4.0, and MIT License.

With Inkscape, you can create SVG fonts. These fonts can later be converted toanother font file format, and be used in a text editor or graphics program. Thereare also a few programs that support SVG fonts directly (Inkscape 0.92.x is notone of them. This is planned for version 1.0, though).

The letters, numbers and special characters a font consists of are calledglyphs.

Create Custom Font Awesome Icons

Windows

To create a custom SVG font:

  1. Open the typography template with File ‣ New from Template ‣ Typography Canvas.
  2. Open the Font Editor dialog from Text ‣ SVG Font Editor.
  3. In the column labelled Font, click on New to create a font. You can double-click on the generic name of the font to change it.
  4. Open the Layers dialog from Layer ‣ Layers.

Repeat the following for each glyph that you want to add to your font:

Create Custom Icon Font Css

  1. In the Layers dialog, add a new layer by clicking on the ‘+' icon.Name it after your letter. Select the layer in the dialog.
  2. Now, in the Font Editor, in the tab Glyphs, click onAdd Glyph. Double-click on the Glyph name field toname your glyph, e.g. call it ‘Capital A' or ‘Space'. In theMatching String field, enter the letter that it corresponds to.
  3. Draw the path for your glyph on the canvas.
  4. When you're happy with your glyph, select it, and also select thecorresponding row in the dialog, then click on Get curves fromselection.
Windows

Tip

You can always test your font by typing a text into the field at the bottom ofthe SVG Font Editor dialog and looking at the preview above it.

Hint

You can use the little ‘eye' icons in the Layers dialog to hide the layers with the glyphs that you have already finished. To protect the completed glyph layers from accidental changes, use the ‘lock' icons.

Create
Custom

Fonts can be saved in different file formats: OTF, TTF and SVG (and some more).

You need to create a new folder there and name it fonts. Next, you need to upload the contents of the icon fonts folder to the fonts directory on your web hosting server. Now you are ready to load icon fonts into your WordPress theme. Simply add this code to your theme's functions.php file or in a site-specific plugin. The most popular font for creating CSS-based icons is Font Awesome. This font and icon toolkit was created by Dave Gandy, originally for Twitter Bootstrap, and is available free under SIL Open Font License 1.1, Creative Commons Attribution 4.0, and MIT License.

With Inkscape, you can create SVG fonts. These fonts can later be converted toanother font file format, and be used in a text editor or graphics program. Thereare also a few programs that support SVG fonts directly (Inkscape 0.92.x is notone of them. This is planned for version 1.0, though).

The letters, numbers and special characters a font consists of are calledglyphs.

Create Custom Font Awesome Icons

To create a custom SVG font:

  1. Open the typography template with File ‣ New from Template ‣ Typography Canvas.
  2. Open the Font Editor dialog from Text ‣ SVG Font Editor.
  3. In the column labelled Font, click on New to create a font. You can double-click on the generic name of the font to change it.
  4. Open the Layers dialog from Layer ‣ Layers.

Repeat the following for each glyph that you want to add to your font:

Create Custom Icon Font Css

  1. In the Layers dialog, add a new layer by clicking on the ‘+' icon.Name it after your letter. Select the layer in the dialog.
  2. Now, in the Font Editor, in the tab Glyphs, click onAdd Glyph. Double-click on the Glyph name field toname your glyph, e.g. call it ‘Capital A' or ‘Space'. In theMatching String field, enter the letter that it corresponds to.
  3. Draw the path for your glyph on the canvas.
  4. When you're happy with your glyph, select it, and also select thecorresponding row in the dialog, then click on Get curves fromselection.

Tip

You can always test your font by typing a text into the field at the bottom ofthe SVG Font Editor dialog and looking at the preview above it.

Hint

You can use the little ‘eye' icons in the Layers dialog to hide the layers with the glyphs that you have already finished. To protect the completed glyph layers from accidental changes, use the ‘lock' icons.

When you are done, save the file as an Inkscape SVG (this is Inkscape's standard file format).

Although this functionality is meant for typographers, amateurs, too, can quicklyget a working result and test their work as they go.

When your font is finished, you can use a software like FontForge where you import your SVG font and can exportit into different formats to be able to use it with other software.

The typography template has just the right size for a single letter. It comes with a set of useful guides. On the right side, the letter ‘a' has already been added to the SVG font.





broken image