Re: default viewport size of SVG resource documents

On Thu, 12 Mar 2015 07:53:05 +0100, Dirk Schulze <dschulze@adobe.com>  
wrote:

>
>> On Mar 12, 2015, at 7:08 AM, Cameron McCormack <cam@mcc.id.au> wrote:
>>
>> Is it defined what the default size of an SVG resource document is?  I
>> don’t think it is, and we probably should define it.
>>
>> I am not sure whether it is possible to write content that depends on
>> this size in regular SVG documents (if you think of a way, let me
>> know!), but I think it is possible with SVG glyphs in OpenType.  For
>> example, if the font document is:
>>
>>  <svg xmlns="http://www.w3.org/2000/svg">
>>    <rect glyphid="1" width="100%" height="20"/>
>>  </svg>
>>
>> this would define a glyph consisting of a rectangle that hangs just
>> below the baseline at a height of 20 units-per-em.  It’s not clear what
>> the 100% would resolve against, though.  In a regular SVG document that
>> is being presented in some viewport then that viewport size will
>> determine the viewBox automatically.
>>
>> For font documents, I think it could make sense to define the viewport
>> as a square whose width and height are the units-per-em value from the
>> font’s head table.  More sense than any other values, probably.
>
> Is this question specific to font documents?

I think the question might apply to <use> resource documents too.

For that case it could possibly also depend on whether resource documents  
are shared between <use> instances or not (not sure this is defined).

> Or do you think even for standalone documents this is not specified  
> enough?

I'd agree that it's not clear which viewport to use for resources that  
don't themselves specify an intrinsic width and height.


-- 
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group

Received on Thursday, 12 March 2015 14:07:16 UTC