[rfc-i] No, constraining to a custom SVG profile is not trivial

Martin J. Dürst duerst at it.aoyama.ac.jp
Mon Jan 20 21:48:59 PST 2020

On 21/01/2020 14:02, Doug Royer wrote:
> On 1/20/20 12:32 PM, Phillip Hallam-Baker wrote:
>> It is not just the greyscale that is the issue. There are numerous 
>> issues in the diagrams that result from the chosen profile.
>> Compare the diagrams in:
>> https://tools.ietf.org/id/draft-hallambaker-mesh-architecture-12.html
>> With the originals in:
>> https://mathmesh.com/Documents/draft-hallambaker-mesh-architecture.html
>> Getting the diagrams to present properly is at least two weeks work 
>> for me on top of the weeks already spent. And I am probably not going 
>> to be the last person making this set of complaints. I am just the 
>> first person who developed specs that depend on having good diagrams 
>> in them.
> I think I understand your point, however the example you provided is not 
> really an SVG vs RFC-7996-SVG comparison. I also agree some of the 
> RFC-7996-SVG limitations seem extreme.
> The problem is the VISIO to RFC-7996-SVG conversion tool your using is 
> selecting a wider font than the original. The conversion tool would need 
> to get the em width, and match it up to a font with the same em width, 
> or adjust the font size.

In SVG, there is actually a specific attribute for dealing with the 
variation in overall width of a text depending on the font. It is called
textLength. Please see 
https://www.w3.org/TR/SVG11/text.html#TextElementTextLengthAttribute. I 
do not know whether this attribute is allowed in the RFC subset of SVG, 
but it should be.

Regards,   Martin.

>   (1) It looks like VISIO places some object to absolute positions.
>   (2) VISIO seems to set some text objects relative to each other based 
> on em ('M') width.
>   (3) VISIO seems to set font size by the size of the 'M' (em) 
> character, rather than absolute point sizes. And different fonts have a 
> different em sizes.
> The same is going to happen if the browser viewing mathmesh.com does not 
> support the 'Calibri' font (unlikely, but the diagram will look messed up).
> Have you tried using monospace or sans-serif in VISIO? They are also 
> supported in RFC-7996. I am guessing you will have to tweak your VISIO 
> file after the change.
> Example, in the mathmesh.com SVG file (Calibri font):
>    .st2 {fill:#000000;font-family:Calibri;font-size:1.00001em}
>   ...
>    <text x="11.64" y="430.18" class="st2" v:langID="1033"><v:paragraph 
> v:horizAlign="1"/><v:tabList/>ProfileMaster<v:newlineChar/><tspan 
> x="33.25" dy="1.2em" class="st3">Alice</tspan></text>
> Yet in the IETF.org version is in a different font (sans-serif font):
> <text x="11.64" y="430.18" fill="#000000" font-family="sans-serif" 
> font-size="1.00001em">ProfileMaster<tspan x="33.25" y="444.580144" 
> font-size="1em">Alice</tspan></text>
> NOTE: When I update the SVG file from mathmesh.com and change the 
> embedded CSS font from 'Calibri' (mathmesh.com) to 'sans-serif' 
> (IETF.org), it looks as broken as the IETF.org version.

More information about the rfc-interest mailing list