Re: Better if context-fill was "opt in" for OT-SVG

I agree with Leonards take on this.

Note that there are 7 CSS properties that inherit values from the document they get used in for Firefox [1]. (So this is behavior is not only limited to Edge.)

Greetings,
Dirk

[1] http://searchfox.org/mozilla-central/rev/bb22cc4067c3832b943507497389b0b13d6f3a2b/layout/svg/svg.css#22-32 (link by Cameron)

On Sep 2, 2016, at 9:22 AM, Leonard Rosenthol <lrosenth@adobe.com<mailto:lrosenth@adobe.com>> wrote:

My original answer for this was going to be that authoring tools, such as Illustrator, don’t need to specify a color since it is assuming a default graphic state – similar to what Postscript or PDF define.  However, I just read over the SVG 1.1 spec and the only reference I can find to anything close is 6.16, the User agent style sheet – but that says nothing about the actual styling.  So then I went to the CSS2 spec, to see if it had anything useful to add – and in 14.1 is just says that that initial value for color is “depends on the user agent”.  Unless there is something that I am missing, that would indeed imply that tools that aren’t explicit about color values are just asking for trouble ☹.

Now, having said that – if the tools starting putting explicit color in – then content-fill (regardless of opt in or out wouldn't work) on most/all existing content.  Instead, what should happen – according to the SVG spec (11.2, specifying paint) is that the author would need to specify the value of currentColor for any place where inheritance from the “parent” is required.

So that's my take early in the morning after a long plane flight…

Leonard

From: Sairus Patel <sppatel@adobe.com<mailto:sppatel@adobe.com>>
Date: Friday, September 2, 2016 at 1:58 AM
To: "public-svgopentype@w3.org<mailto:public-svgopentype@w3.org>" <public-svgopentype@w3.org<mailto:public-svgopentype@w3.org>>
Subject: Better if context-fill was "opt in" for OT-SVG
Resent-From: "public-svgopentype@w3.org<mailto:public-svgopentype@w3.org>" <public-svgopentype@w3.org<mailto:public-svgopentype@w3.org>>
Resent-Date: Friday, September 2, 2016 at 1:59 AM

Adobe & at least a couple of other companies & foundries, when creating an OT-SVG font by assembling existing SVG artwork, have encountered the same “surprise” now and then in recent months.

The standalone artwork isn’t always explicit about specifying color “black” – resulting in unexpected colors when the corresponding OT-SVG glyph is displayed with the text color set to something other than black in conforming implementations (the stylesheet at https://www.microsoft.com/typography/otspec/svg.htm sets fill to context-fill).

Tools for creating SVG such as Adobe Illustrator will not emit explicit coloration for black when exporting to SVG. This significantly contributes to this particular issue, since Illustrator is a major tool for designing SVG artwork.

It seems that an OT-SVG font designer should explicitly “opt in” when desiring that a portion of the glyph be set to context-fill, since this would be the somewhat unusual case, and thus a conscious design decision.

We are still in the initial stages of OT-SVG adoption, & it would seem to be appropriate to adjust things in the spec now rather than later.

Thoughts?

Sairus

Received on Friday, 2 September 2016 19:09:56 UTC