问题
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