Can anyone please guide me on embedding the font in elgg.

I have a new font name droidsans suggested by designing. Where to embed the file in elgg to get that font.

DroidSans/droidsans-bold-webfont.eot
DroidSans/droidsans-bold-webfont.svg
DroidSans/droidsans-bold-webfont.ttf
DroidSans/droidsans-bold-webfont.woff
DroidSans/droidsans-webfont.eot
DroidSans/droidsans-webfont.svg
DroidSans/droidsans-webfont.ttf
DroidSans/droidsans-webfont.woff
DroidSans/stylesheet.css

 

All this files i have right now in my hand. Where i need to place to get the font?

  • Hi!

    You have to make a plugin to extend the default's css, add this font and put the path of where the font is (Inside your plugin)

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • @shanu

    e.g.

    @font-face {
        font-family: 'droidsans-bold-webfont';
        src: url('<?php echo elgg_get_site_url(); ?>mod/my_plugin/DroidSans/droidsans-bold-webfont.eot');
        src: url('<?php echo elgg_get_site_url(); ?>mod/my_plugin/DroidSans/droidsans-webfont.eot') format('embedded-opentype'),
             url('<?php echo elgg_get_site_url(); ?>mod/my_plugin/DroidSans/droidsans-bold-webfont.woff') format('woff'),
             url('<?php echo elgg_get_site_url(); ?>mod/my_plugin/DroidSans/droidsans-bold-webfont.ttf') format('truetype'),
             url('<?php echo elgg_get_site_url(); ?>mod/my_plugin/DroidSans/droidsans-bold-webfont.svg') format('svg');
    }

  • Steps to be followed to embed new font into the source/site:

    Step 1: add those webfont.eot,webfont.woff,webfont.ttf,webfont.svg into the graphics folder of the theme/default source.

    Step 2:  include the @font-face of regular and bold in the site theme css page

    Step 3: change the right path of the folder in css as said by RvR in above comments.

    Step 4: upgrade the site(/upgrade.php) once till step 3 is done.