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
+24.7k Golang : Create PDF file from HTML file
+4.4k Adding Skype actions such as call and chat into web page examples
+6.4k Golang : How to validate ISBN?
+17.8k Golang : Convert IPv4 address to decimal number(base 10) or integer
+18.9k Golang : Calculate entire request body length during run time
+19k Golang : Get RGBA values of each image pixel
+11.9k Golang : md5 hash of a string
+11k Golang : Fix fmt.Scanf() on Windows will scan input twice problem
+9.4k Golang : Eroding and dilating image with OpenCV example
+15.7k Golang : Generate universally unique identifier(UUID) example
+39.7k Golang : Convert to io.ReadSeeker type
+23.7k Golang : Upload to S3 with official aws-sdk-go package