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
+4.8k Golang : A program that contain another program and executes it during run-time
+8.9k Golang : Gaussian blur on image and camera video feed examples
+21.8k Golang : Setting up/configure AWS credentials with official aws-sdk-go
+18k Golang : Login and logout a user after password verification and redirect example
+7.4k Golang : Fixing Gorilla mux http.FileServer() 404 problem
+37.5k Upload multiple files with Go
+18.6k Golang : Set, Get and List environment variables
+6.1k Golang : Grab news article text and use NLP to get each paragraph's sentences
+6.4k Golang : Selection sort example
+21.8k SSL : How to check if current certificate is sha1 or sha2
+5.6k Fix fatal error: evacuation not done in time problem
+21.2k Golang : Get password from console input without echo or masked