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
+9.3k Golang : How to control fmt or log print format?
+10.6k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+20.1k Golang : Convert(cast) bytes.Buffer or bytes.NewBuffer type to io.Reader
+17.3k Golang : When to use init() function?
+11k Golang : Removes punctuation or defined delimiter from the user's input
+5.9k Facebook : How to force facebook to scrape latest URL link data?
+30.1k Golang : Get time.Duration in year, month, week or day
+11.2k Golang : Read until certain character to break for loop
+5.3k Responsive Google Adsense
+8k Swift : Convert (cast) String to Float
+7.5k Golang : Example of custom handler for Gorilla's Path usage.
+16.6k Golang : File path independent of Operating System