Are SVG fonts still working in Google Chrome?

冷暖自知 提交于 2021-02-07 12:29:18

问题


I have been redesigning a website for a while on and off, but for the last 6 months I've been out of the loop so to speak and may have missed something important regarding svg fonts no longer working with chrome?

Here is a snippet of one of my stylesheets:

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'NewFont';
src: url("newfont-webfont.svg#NewFont") format("svg");
}}

I've replaced the SVG with my WOFF version and the fonts look just about OK, however the SVG always looked better in chrome for this particular font, however for whatever reason the SVG won't display the fonts, where I'm fairly sure only a few months ago everything was fine.

I've done a little research and found from this link: http://blog.chromium.org/ "SVG fonts are no longer supported, except on Windows systems older than Windows 7. Note that while the feature works on those systems, it is considered deprecated." From version 38.

Any particular reason they are no longer supporting them and is there any need for them in my stylesheet for other browsers/platforms can you tell me?


回答1:


Chrome is no longer supporting SVG Fonts as of Chrome 38 because they see it as a workaround for poor font rendering (just like how you said the SVG version 'looks better'). SVG fonts don't support kerning or ligatures. It's also important to note that IE doesn't support SVG fonts and Firefox never will.

You can read more about it here:

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/pYbbUcYvlYY



来源:https://stackoverflow.com/questions/26301986/are-svg-fonts-still-working-in-google-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!