Okay
  Print

How to add custom icon font to the theme

Hi,

This requires customization of several theme files. 

First of all you need to import your font file. Please take a look at the top of style.cargo.css file and you will find @font-face declaration. You need to import your own font files in the same manner as FontAwesome and the rest and declare the font-family as, for example 'myFont'.

Then you need to search for all 'data-ico-fa' in the style.cargo.css file and create respective statements for your font. For example when you locate

.btIco .btIcoHolder[data-ico-fa]:before{font-family:FontAwesome;content:attr(data-ico-fa)}

you need to create 

.btIco .btIcoHolder[data-ico-mf]:before{font-family:myFont;content:attr(data-ico-mf)}

Please make sure to find all occurrences of data-ico-fa and create respective data-ico-mf statements.

Then, you need to create new file in cargo plugin folder called bt_mf_icons.php by copying the file bt_fa_icons.php and changing it by mapping your glyph codes:

function bt_mf_icons() {
 $arr = array(
 '  ' => 'no_icon', 
 'myname1 (mf)' => 'mf_' . 'xxxx',
 'myname2 (mf)' => 'mf_' . 'xxxx',
etc...

Finally, you need to edit cargo.php in your plugin's folder: 

search for bt_fa_icons.php and add equivalent statements for bt_mf_icons.php:

if ( ! function_exists( 'bt_mf_icons' ) ) {
 require_once( 'bt_mf_icons.php' );
 }

then search for bt_fa_icons() and add respective statements for bt_mf_icons() as well - change all occurrences of 

$icon_arr = array_merge( bt_fa_icons(), bt_s7_icons(), bt_custom_icons() );

to

$icon_arr = array_merge( bt_fa_icons(), bt_mf_icons(), bt_s7_icons(), bt_custom_icons() );