Intent to Deprecate and Remove SVG fonts

1,821 views
Skip to first unread message

Philip Rogers

unread,
Jun 25, 2014, 8:24:03 PM6/25/14
to blink-dev
Primary eng

Link to "Intent to Deprecate" thread
Not an official intent thread but we have had a lengthy discussion on blink-dev about dropping this: https://groups.google.com/a/chromium.org/d/msg/blink-dev/_19XaMfHdww/6y2i04n5784J.

Summary
SVG fonts provide a way to use SVG to define font glyphs.

Motivation
SVG fonts are being used as a workaround for poor font rendering in Chrome on Windows but are otherwise poorly supported (no kerning or ligatures!) and incompatible with other browsers. Now that DirectWrite has brought us beautiful fonts on Windows[1] we should drop support for SVG fonts. SVG fonts were dropped from SVG2[2] and neither Firefox nor IE support them[3].

Usage information from UseCounter
Usage is relatively high at 0.35% of pageviews (http://www.chromestatus.com/metrics/feature/timeline/popularity/156) because SVG fonts are still used as a workaround. I do not expect most of these sites to break when SVG fonts are removed but instead to fallback to the fonts used by IE and Firefox.

None.

Compatibility Risk
On DirectWrite-compatible platforms rendering will be improved by this removal: SVG fonts did not support kerning or ligatures and had difficulty with non-English text[4]. XP does not support DirectWrite and this will regress font rendering for XP users, though the regression will primarily be in font rendering quality and not overall usability. I don't have Chrome-specific numbers but in general XP usage is somewhere south of 15% and dropping[5].

[1] crbug.com/25541 - DirectWrite support

Kouhei Ueno

unread,
Jun 25, 2014, 11:32:48 PM6/25/14
to Philip Rogers, Hajime Hoshi, blink-dev
+1

I'd really love this to happen.
The current SVG font implementation is very complex and hard to maintain.
SVG font is also very likely to be source of some memory issues according to hajimehoshi@.
Font caches have fairly long life-time, and if SVG font is used, the whole SVG document will survive longer, resulting in unexpected memory bloat.

My only concern is that the current usage stat is a bit high.
Is it because SVG fonts are selected in Chrome even when there are multiple choices (woff, ttf, etc) defined in css?
If I understand the use counter code correctly, this use counter is only incremented when SVG fontface is actually loaded, right?


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.



--
Kouhei Ueno

Eric Seidel

unread,
Jun 25, 2014, 11:44:11 PM6/25/14
to Kouhei Ueno, Philip Rogers, Hajime Hoshi, blink-dev
Do we have any idea if usage is higher/lower on mobile?

A conservative approach might be to make support runtime-guarded, turn
the flag off, and see how far down the channel pipeline we can get w/o
complaints.

Another approach would be to use a runtime flag to change the
preference order. Have the font selection logic skip over SVG fonts
when other fonts are available.

I think our biggest risk would be if there is a substantial amount of
Mobile content which depends on SVG Fonts (and has only designed with
WebKit in mind).

LGTM to try one of the above runtime paths. I think I'd need more
convincing to want to just delete the code outright at this high a
usage number.

Philip Rogers

unread,
Jun 25, 2014, 11:44:31 PM6/25/14
to Kouhei Ueno, Hajime Hoshi, blink-dev
Hi Kouhei,

Your description of the UseCounter is correct: we increment the count when an SVG font is used.

The high usage is deceptive because sites are listing the SVG font first so that Chrome picks it up. All other browsers just skip over the SVG font and use the next available font, like blink will do if we remove SVG font support. http://crbug.com/290414#c7 is an example of a user following this pattern. I am not aware of any pages (other than spec examples) that depend on SVG font support.

Philip Rogers

unread,
Jun 25, 2014, 11:51:09 PM6/25/14
to Eric Seidel, Kouhei Ueno, Hajime Hoshi, blink-dev
Eric,

I pushed for keeping the ENABLE(SVG_FONTS) directive for this reason. Would you be supportive of using that to disable SVG font support, and fully removing the code once we land in stable?

Dimitri Glazkov

unread,
Jun 26, 2014, 12:31:24 AM6/26/14
to Philip Rogers, blink-dev
LGTM!!!

Nico Weber

unread,
Jun 26, 2014, 12:51:00 AM6/26/14
to Dimitri Glazkov, Philip Rogers, blink-dev
I think XP share for chrome is over 15%, and not falling quickly. Please check with cpu what he thinks about enworsening the experience for XP users.

Dirk Schulze

unread,
Jun 26, 2014, 4:36:28 AM6/26/14
to Philip Rogers, blink-dev
>
> Motivation
> SVG fonts are being used as a workaround for poor font rendering in Chrome on Windows but are otherwise poorly supported (no kerning or ligatures!) and incompatible with other browsers.

That is not correct, SVG Fonts as implemented definitely support kerning and ligatures. Maybe you mean something different?

Greetings,
Dirk

Philip Rogers

unread,
Jun 26, 2014, 3:59:38 PM6/26/14
to Dirk Schulze, blink-dev, Carlos Pizano
Dirk,

Blink does not support kerning in SVG fonts, though you are correct that we do support ligatures. As a result, SVG fonts will be less legible than even a fallback font.


Nico,

Leaving SVG fonts enabled results in a degraded experience for Windows Vista, 7, and 8 users because SVG fonts do not go down the standard and well-tested DirectWrite codepath. I created an example at http://pr.gg/fonts.html if you would like to compare. We could improve SVG fonts but I do not think we should invest further in this separate codepath.

Elliott Sprehn

unread,
Jun 26, 2014, 4:30:42 PM6/26/14
to Philip Rogers, Dirk Schulze, blink-dev, Carlos Pizano
I support removing them for all the reasons pdr@ outlines, but I think we should take the approach eseidel@ is suggesting. Lets put it behind a flag, wait a release, and then remove it if there's no major bugs filed.

Stephen Chenney

unread,
Jun 26, 2014, 4:50:20 PM6/26/14
to Elliott Sprehn, Philip Rogers, Dirk Schulze, blink-dev, Carlos Pizano
I also agree with the approach suggested by Eric and seconded by Elliott.

Kenji Baheux

unread,
Jun 26, 2014, 6:09:22 PM6/26/14
to Stephen Chenney, blink-dev, Dirk Schulze, Carlos Pizano, Elliott Sprehn, Philip Rogers

Perhaps in addition to the suggested approach, we could have a metric tracking how often svg fonts are used without a decent fallback. I don't expect this to be a concern but it would be nice to be backed by data.

That being said, I'm supportive as well :)

2014/06/27 5:50 "Stephen Chenney" <sche...@chromium.org>:

PhistucK

unread,
Jun 26, 2014, 6:25:41 PM6/26/14
to Philip Rogers, Dirk Schulze, blink-dev, Carlos Pizano
Since the code path is already different for Windows Vista and up (or whatever platform that supports DirectWrite), perhaps disable them on those platforms and keep it alive on Windows XP?
But I guess that misses the point, huh? Yeah, sounds like a bad idea either way. I do not support dropping it if it makes the Windows XP experience worse at the moment. However, I think this should be revisited when the numbers go farther down.

Also, Android does not have correct use counter numbers before Chrome 36, if I remember correctly, so we need to wait before making any decision.

Finally, adding a 'use' counter for the existence of a fallback format (even though it is not used) would help to make a more informed decision.


PhistucK


Philip Rogers

unread,
Jun 26, 2014, 6:37:06 PM6/26/14
to PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
PhistucK,

Your point is similar to the one Nico made above. Not regressing XP means we keep our poor font rendering on Windows Vista, 7, and 8 users. According to statcounter, the other Windows platforms have over 4x as many users as XP.

Scott Graham

unread,
Jun 26, 2014, 7:42:51 PM6/26/14
to Philip Rogers, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
We don't support DirectWrite on Vista.

Looking at your stat counter link, I would note that while XP+Vista is shrinking, in absolute numbers it's still large vs. other OSs. e.g. more than double OS X (not even counting lower Chrome usage as a percentage on that platform).

For those poor souls lacking XP machines, here's a grab of http://pr.gg/fonts.html: http://i.imgur.com/HU0Mlsk.png
Free Sans looks almost illegible, but Droid Sans looks fine. Does the usage data include what face it was used for? We could get a better idea of how bad we're actually talking about.


(I have no concept of the maintenance burden this imposing. And I promise I dislike XP's continuing existence as much as anyone.)

Elliott Sprehn

unread,
Jun 26, 2014, 7:53:41 PM6/26/14
to Scott Graham, Philip Rogers, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
On Thu, Jun 26, 2014 at 4:42 PM, Scott Graham <sco...@chromium.org> wrote:
We don't support DirectWrite on Vista.


Can we fix that? Firefox apparently does support it.

- E 

Emil A Eklund

unread,
Jun 26, 2014, 8:05:13 PM6/26/14
to Elliott Sprehn, Scott Graham, Philip Rogers, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
If we cannot drop support for SVG fonts yet (which would be sad) we
should at least consider artificially giving SVG fonts a lower
priority than the alternatives on all platforms except Win Vista and
earlier. Would be a good first step towards eventually dropping
support entirely.

Scott Graham

unread,
Jun 26, 2014, 8:11:32 PM6/26/14
to Elliott Sprehn, Philip Rogers, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
Maybe, with effort:
- requires an OS update so some percentage of Vista won't get it anyway
- Firefox doesn't have our sandbox
- Vista has many fewer users than XP
- Vista is also shrinking fast

So we'd have to have a compelling reason to do the work.


- E 

Philip Rogers

unread,
Jun 27, 2014, 4:50:06 PM6/27/14
to Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
There is near-universal support for dropping SVG fonts everywhere except GDI platforms (XP, Vista) as long as we can easily back out the change if it proves not web compatible. Dropping SVG font usage on GDI platforms is a non-starter due to awful web font rendering. I suspect SVG font usage is highest where XP usage is the lowest (non-English countries, particularly China) but we don't have the data to show that.

How does this sound:
1) Drop SVG font support today on non-GDI platforms (Android, Win7, Win8, OSX, Linux) with a runtime check.
2) If #1 makes it to stable we will learn that it's web compatible to remove SVG fonts, and we will start getting SVG font usage data on GDI platforms.
3) Depending on how #2 looks, we can decide to completely drop SVG fonts.

Adam Barth

unread,
Jun 27, 2014, 4:52:03 PM6/27/14
to Philip Rogers, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
How much binary would keeping the feature compiled into on Android builds cost?

Adam

Philip Rogers

unread,
Jun 27, 2014, 5:36:12 PM6/27/14
to Adam Barth, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
Adam,

Compiling without SVG fonts saves 22KB on Chrome.apk, or about 0.07%. Dropping SVG fonts is more about reducing complexity, improving rendering quality, and web compatibility.

Adam Barth

unread,
Jun 27, 2014, 5:39:34 PM6/27/14
to Philip Rogers, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
Thanks!

TAMURA, Kent

unread,
Jun 30, 2014, 3:23:44 AM6/30/14
to Philip Rogers, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
This plan LGTM.

We don't have the web font rendering quality issue on non-Windows, right?
--
TAMURA Kent
Software Engineer, Google


Adam Barth

unread,
Jun 30, 2014, 1:14:40 PM6/30/14
to TAMURA, Kent, Philip Rogers, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
LGTM as well

Philip Rogers

unread,
Jul 1, 2014, 6:00:22 PM7/1/14
to TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
I'm not aware of any webfont rendering issues other than the GDI issues on XP and Vista.

Patch for landing: https://codereview.chromium.org/360203002 (pending API owner approval).

Jake Archibald

unread,
Jul 2, 2014, 4:51:19 AM7/2/14
to Philip Rogers, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
On Tue, Jul 1, 2014 at 10:59 PM, Philip Rogers <p...@chromium.org> wrote:
I'm not aware of any webfont rendering issues other than the GDI issues on XP and Vista.

On XP, what's the rendering difference between SVG fonts and CFF? CFF antialiases on both axis on XP & looks a lot better at heading sizes & above. Could we transcode the fonts to CFF before rendering on GDI? Would that be good enough to drop SVG?

Eric Seidel

unread,
Jul 9, 2014, 6:52:19 PM7/9/14
to Jake Archibald, Philip Rogers, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
Fantastic. Thank you. Looking forward to hearing we can drop them
outright. :) LGTM

Philip Rogers

unread,
Oct 22, 2014, 3:45:38 PM10/22/14
to Eric Seidel, Jake Archibald, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
The stable numbers are coming in [1] and already show that SVG font usage was not just for GDI platforms (XP, Vista). Only a few bugs were filed as a result of deprecating SVG fonts on all other platforms. Lets continue [2] with removing SVG fonts from our engine.

Jochen Eisinger

unread,
Oct 22, 2014, 3:47:40 PM10/22/14
to Philip Rogers, Eric Seidel, Jake Archibald, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
lgtm1

dgla...@google.com

unread,
Oct 22, 2014, 3:53:51 PM10/22/14
to blin...@chromium.org, p...@chromium.org, ese...@chromium.org, jakear...@google.com, tk...@chromium.org, sco...@chromium.org, esp...@chromium.org, phis...@gmail.com, dsch...@chromium.org, c...@google.com
AMEN!

Er... I mean, lgtm2.

Eric Seidel

unread,
Oct 22, 2014, 8:44:48 PM10/22/14
to Philip Rogers, Jake Archibald, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
lgtm3

Chris Harrelson

unread,
Oct 28, 2014, 2:06:18 PM10/28/14
to Eric Seidel, Philip Rogers, Jake Archibald, TAMURA, Kent, Scott Graham, Elliott Sprehn, PhistucK, Dirk Schulze, blink-dev, Carlos Pizano
LGTM4

lgtm3
Reply all
Reply to author
Forward
0 new messages