简体   繁体   English

svg文本的字体系列不起作用?

[英]Font-family for svg text is not working?

1) What is the defalut font family for text in SVG? 1)SVG中文本的默认字体家族是什么?

2) I am trying to render on svg text with dynamic font .For first time when I am applying the font Its not working , for the 2nd time onwards It works fine. 2)我正在尝试使用动态字体在svg文本上进行渲染。第一次使用字体不起作用时,第二次以后它可以正常工作。 Can any one help me on this? 谁可以帮我这个事?

Thanks in advance. 提前致谢。

There's no default font ( font-face/font-family ) mentioned. 没有提到默认字体( font-face/font-family )。 in W3C . W3C

NOTE: 注意:

If you specify a font on a web page or in an SVG file that the user doesn't have available, then you're relying on the browser or browser plugin to find a reasonably good match for that font. 如果您在网页上或SVG文件中指定了用户不可用的字体,那么您将依靠浏览器或浏览器插件找到该字体的合理匹配。 Given only the font name, it's going to do a bad job of matching. 仅给出字体名称,将对匹配做不好。 Use the font attribute with a combination of the font-family and other attributes to provide some information that will get a font more like the one you want. 将font属性与font-family和其他属性结合使用,可以提供一些信息,使您获得的字体更像您想要的字体。 The generic family names you can use are 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace' (from the CSS specification). 您可以使用的通用家族名称是“ serif”,“ sans-serif”,“ cursive”,“ fantasy”和“ monospace”(来自CSS规范)。 You can also use other family names like "Times", "Baskerville", "Verdena", and "Symbol." 您还可以使用其他姓氏,例如“ Times”,“ Baskerville”,“ Verdena”和“ Symbol”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM