Xaml export. Tag "whiteSpaceCollapse" is not recognized

Bug #1521688 reported by Camal TAZINE
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
jazzynico

Bug Description

Step to reproduce the bug:
1- Open the attached file "dessin-1.svg" in InkScape
2- Save as Microsoft xaml (Silverlight=no)

In the xaml file the following attribute is not recognized by visual studio:
whiteSpaceCollapse="preserve"

Here is the xaml dump

The following generated xaml will be:
<?xml version="1.0" encoding="UTF-8"?>
<!--This file is NOT compatible with Silverlight-->
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stretch="Uniform">
  <Canvas Name="svg2" Width="744.09448819" Height="1052.3622047">
    <Canvas.RenderTransform>
      <TranslateTransform X="0" Y="0"/>
    </Canvas.RenderTransform>
    <Canvas.Resources/>
    <!--Unknown tag: sodipodi:namedview-->
    <!--Unknown tag: metadata-->
    <Canvas Name="layer1">
      <TextBlock xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" FontSize="40" FontWeight="Normal" FontFamily="sans-serif" FontStyle="normal" Foreground="#FF000000" Canvas.Left="168.57143" Canvas.Top="389,50507" Name="text4136">
        <Span whiteSpaceCollapse="preserve" FontSize="40">Hello World</Span>
      </TextBlock>
    </Canvas>
  </Canvas>
</Viewbox>

Tags: exporting xaml
Revision history for this message
Camal TAZINE (camal-tazine) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Thank you for taking the time to report that issue. It seems to be related to an old report (Bug #1025642 "wrong XAML export", see comment #8), where the whiteSpaceCollapse="preserve" attribute is blocking text rendering.

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
importance: Undecided → Medium
milestone: none → 1.0
status: New → Triaged
jazzynico (jazzynico)
tags: added: exporting
Revision history for this message
Camal TAZINE (camal-tazine) wrote :

Hi jazzynico,

Sorry for have not seen it was an already exsisting issue.

Thanks for having seen it,
Camal

Revision history for this message
jazzynico (jazzynico) wrote :

Hi Camal,

No problem for the reports! Bug #1025642 covers multiple issues and not specifically the whitespace problem.

Just found the following page: https://msdn.microsoft.com/en-us/library/ms788746%28v=vs.110%29.aspx
Apparently XAML files should use xml:space="preserve" exactly as in the SVG file. I don't remember why we used the whiteSpaceCollapse attribute, but it doesn't seem to be correct.

Could you please try the attached XAML file in Visual Studio and confirm it works? It's a modified version of your original file with xml:space="preserve".

Thanks!

Revision history for this message
jazzynico (jazzynico) wrote :

Tried to find details on the whiteSpaceCollapse attribute that I added in 2011 (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/10004), but I can't find anything on it... I guess it's obsolete now. Unfortunately there's no trace of the WPF specification I used.

Patrick Storz (ede123)
Changed in inkscape:
milestone: 1.0-old → 1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.