xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Hillion <shill...@ilog.fr>
Subject Re: Adobe SVGViewer doesn't like font-family:sansserif.italic without apos
Date Thu, 16 Aug 2001 15:12:44 GMT
On Thursday 16 August 2001 16:32, Randall Parker wrote:
> Stephane,
>
> Are you a Batik committer? Is any Batik committer reading this message?
>
> I posted elsewhere and got this response that argues it is a bug in Batik.
> In fact, it is two separate bugs since it is an illegal family name as
> well. This response came from David Woolley <david@djwhome.demon.co.uk>
>
> 	It's an error in Batik, and it is a violation of CSS2 rather
> 	than specifically SVG.
>
> 	See appendix D of the CSS2 specification:
>
> 	amongst other things, attribute values may be strings or
> 	idents.  Strings are between matchedd 's or "s and may not
> 	contain an unescaped instance of the corresponding quote.

This is not what the grammar describe. A property value can be a list of what 
you want separated by any operator including white-spaces. So for example:

  font-family: Times New Roman, serif;

is a well-formed property declaration.

And according to the CSS2 spec, the unquoted name Times New Roman is valid:

<family-name>
The name of a font family of choice. In the previous example, "Baskerville", 
"Heisi Mincho W3", and "Symbol" are font families. Font family names 
containing whitespace should be quoted. If quoting is omitted, any whitespace 
characters before and after the font name are ignored and any sequence of 
whitespace characters inside the font name is converted to a single space.


>
> 	idents are a name start character followed by:
> [a-z0-9-]|{nonascii}|{escape}
>
> 	[DJW:]  which doesn't permit unescaped .s.
>
> 	Note that sans-serif, with a hyphen, is a reserved name
> 	and this attribute is a family name, so should not normally
> 	include modifiers like italic or bold (CSS2 14.4.6).

It is right, but sansserif.italic is a valid family name, equivalent to 
"sansserif.italic" since there is no rule to says that a system font name 
can't contain a dot or one of the CSS reserved keywords.
And it is not an error to refer to an unavailable font.

>
> On Tue, 14 Aug 2001 18:44:44 +0200, Stephane Hillion wrote:
> >On Tuesday 14 August 2001 18:18, Randall Parker wrote:
> >> It appeas that Adobe's SVGViewer considers this line to be bad because
> >> of the .italic as part of the font family name:
> >>
> >>         <font-face ascent="100.52667" descent="21.970367"
> >> units-per-em="100" style="font-family:sansserif.italic; font-
> >> style:italic; font-weight:normal;" />
> >>
> >> Changing to
> >>    font-family:sansserif;
> >>  removes the bad CSS error that I reported:
> >>      bad CSS property or descriptor declaration
> >>
> >> I noticed something else too. There were three occurrences of
> >> sansserif.italic. The later 2 were in text tags:
> >>
> >> <text x="227.9677734375" y="254.92665100097656" style="font-size:12;
> >> font-family:&apos;sansserif.italic&apos;; font-style:italic;
> >> stroke:none;">
> >>
> >> Note that they have the ampersand apostrophes around them. So then I
> >> changed the font-face font-family attribute to have the ampersand
> >> apostrophe
> >>
> >>         <font-face ascent="100.52667" descent="21.970367"
> >> units-per-em="100" style="font-family: &apos;sansserif.italic&apos;;
> >> font-style:italic; font-weight:normal;" />
> >>
> >> Now SVGViewer no longer generates an error message about this SVG file.
> >>
> >> So is it a bug in Batik for the font-face font-family to not put the
> >> apos chars around a font family that has a dot in the middle of it?
> >
> >It seems to be a bug in SVGViewer.
> >See http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-family for
> > details about font name quoting rules.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message