Chrome renders SVG fonts better than TTF, so I wanted to force it to use the SVG files. But when I only include the SVG in my declaration, Chrome doesn't find/apply the font. If I remove the hash symbol, it does apply it (likely the first thing found in the svg)! What am I doing wrong?
file structure
/
/fonts
/styles
styles.css
@font-face {
font-family: "TeXGyreHerosCnBoldItalic";
src: url( "../fonts/texgyreheroscn-bolditalic-webfont.svg#TeXGyreHerosCnBoldItalic" ) format("svg" );
font-weight: normal;
font-style: normal;
}
html
<div style="font-family: 'TeXGyreHerosCnBold';">Some text</div>
If I instead do this, it works:
src: url( "../fonts/texgyreheroscn-bolditalic-webfont.svg" ) format("svg" );