Fontello : How to load and use fonts?
Problem :
You have downloaded the Fontello fonts that you wanted and now you want to get the fonts to display on your webpage. How to call the fonts?
Solution :
A typical Fontello font zip file should have directory structure that look like this :
Load the CSS file for the pages you want to use the fonts. For example, on this website. I would load the CSS file on the header section like this :
<link rel="stylesheet" type="text/css" media="screen" href="https://www.socketloop.com/public/assets/fonts/fontello/css/fontello.css">
The fontello.css file should be the default CSS file to load and it handles everything from there.
NOTE : adjust the include path(
href
) to suit your website structure.To invoke the font, you can use
class="fontello-icon-NAME"
in the place where you want the font to appear. For example, in this page Like Us On Facebook widget, the Facebook Fontello font is called by :<i class="fontello-icon-facebook></i>
Hope this simple tutorial can be useful to you.
Reference :
https://github.com/fontello/fontello/wiki/How-to-use-fontello-fonts-in-your-project
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.5k Golang : Gorrila set route name and get the current route name
+7.1k Golang : Number guessing game with user input verification example
+23.9k Golang : Convert IP address string to long ( unsigned 32-bit integer )
+25.3k Golang : Force your program to run with root permissions
+4k Fix Google Analytics Redundant Hostnames problem
+18.3k Golang : Count JSON objects and convert to slice/array
+12.1k Swift : Convert (cast) Int to String ?
+9k Android Studio : Simple input textbox and intercept key example
+5.5k Unix/Linux : Use netstat to find out IP addresses served by your website server
+11.4k Golang : HTTP response JSON encoded data
+6.3k Golang : Not able to grep log.Println() output
+7.7k nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)