我想将新的字体文件添加到我的web应用程序中。我无法找到在@ font-face规则中添加svg文件的完美句法。我的字体规则采用scss格式。下面是这些。在@ font-face规则中使用svg字体文件的确切语法是什么
@font-face {
font-family: "Brandon";
src: asset_url("#{$font-reg}.eot");
src:
asset_url("#{$font-reg}.eot?#iefix") format("embedded-opentype"),
asset_url("#{$font-reg}.woff2") format("woff2"),
asset_url("#{$font-reg}.woff") format("woff"),
asset_url("#{$font-reg}.ttf") format("truetype"),
asset_url("#{$font-reg}.svg#svgFontName") format("svg");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Brandon";
src: asset_url("#{$font-bold}.eot");
src:
asset_url("#{$font-bold}.eot?#iefix") format("embedded-opentype"),
asset_url("#{$font-bold}.woff2") format("woff2"),
asset_url("#{$font-bold}.woff") format("woff"),
asset_url("#{$font-bold}.ttf") format("truetype"),
asset_url("#{$font-bold}.svg#svgFontName") format("svg");
font-weight: 700;
font-style: normal;
}
我需要在上面的svg文件的'#'之后放置什么。我很困惑。任何帮助,高度赞赏。
了解。非常感谢你的帮助。 – user3155497