When I was designing a website, I needed an icon of Python, so I turned to Flaticon and found what I was looking for.
This snippet shows the HTML code I used:
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<link href="{% static "css/flaticon.css" %}" rel="stylesheet" type="text/css">
<link href="{% static "css/font-awesome.css" %}" rel="stylesheet" type="text/css">
<link href="{% static "css/font-mfizz.css" %}" rel="stylesheet" type="text/css">
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<i class="icon-python" style="font-family: Flaticon, serif"></i>
<i class="icon-python"></i>
<i class="fa-gamepad"></i>
</body>
</html>
To double-check the rendering of this specific icon, I created a separate HTML document just for that purpose.
Here's the error message from the browser console when running the Django server locally on Opera:
GET net::ERR_ABORTED
GET net::ERR_ABORTED
As a result, only the Font-Awesome icon is displayed on the page since there were errors loading Flaticon and Font-mfizz fonts.
The issue seems to be related to the python code within the Flaticon.css file:
/*
Flaticon icon font: Flaticon
Creation date: 17/03/2018 04:22
*/
@font-face {
font-family: "Flaticon";
src: url("./Flaticon.eot");
src: url("./Flaticon.eot?#iefix") format("embedded-opentype"),
url("./Flaticon.woff") format("woff"),
url("./Flaticon.ttf") format("truetype"),
url("./Flaticon.svg#Flaticon") format("svg");
font-weight: normal;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "Flaticon";
src: url("./Flaticon.svg#Flaticon") format("svg");
}
}
[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {
font-family: Flaticon, serif;
font-size: 20px;
font-style: normal;
margin-left: 20px;
}
.flaticon-smart-house:before { content: "\f100"; }
.flaticon-air-conditioner:before { content: "\f101"; }
In addition, PyCharm while running Django also encountered URL errors specifically with Flaticon and Font-mfizz compared to Font-Awesome: