Embed Font Awesome icons in QGIS layout HTML Frame

fonthtmlprint-composerqgis

I'd like to embed some Font Awesome social media icons into a QGIS 3.16 layout, using the "HTML Frame" element ("Add HTML" tool).

How would I go about either:

  1. Embedding web references to the icons in the CSS portion of the element, or
  2. Adding a reference to a locally downloaded icon pack?

Best Answer

  1. Just add the CDN to the stylesheet.
  2. Use an image tag and set the src to the svg
<html>
<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
</head>
<body>
    <!-- via CDN -->
    <i class="fa-brands fa-github"></i>
    <!-- via local file -->
    <img width=30 height=30 src="sass.svg"/>
</body>
</html>

enter image description here

Related Question