The logo for my website is an SVG file. I use a simple initials based logo, just X & R for the logo, set in Teko font.

When using fonts in SVG, non-system fonts are forcibly replaced by the standard system fonts.

Since SVG supports CSS for styling, it is easier to include the font into the SVG.

To do that,

  1. Embed the base64-encoded font source into the SVG with a defs element.
<defs>
    <style>
        @font-face {
                font-family: 'Teko';
                font-style: normal;
                font-weight: 400;
                src: local('Teko'), local('Teko-Regular'),
                url(data:font/woff2;base64,BASE_64_STRING_GOES_HERE) format('woff2');
                unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
    </style>
</defs>
  1. Convert the font to base64 using the Embedded Google Fonts tool and replace the BASE_64_STRING_GOES_HERE with the base64 string.

Footnotes