metanorma / mn2pdf

Metanorma XML to PDF
3 stars 3 forks source link

Error Illegal char <"> at index ... #241

Closed Intelligent2013 closed 6 months ago

Intelligent2013 commented 6 months ago

Source issue: https://github.com/metanorma/metanorma/issues/357

The source presentation XML contains SVG (fragment):

<span style="background-color: rgb(255 , 255 , 255) ; font-family: &quot;source code pro&quot; , &quot;menlo&quot; , &quot;monaco&quot; , &quot;courier new&quot; , monospace , &quot;menlo&quot; , &quot;monaco&quot; , &quot;courier new&quot; , monospace">
                                   text
                                </span>

The error occurs on Win10:

Illegal char <"> at index 46: C:\Users\TestUser/.fontist/fonts\filenotfound_"source code pro".ttf
java.nio.file.InvalidPathException: Illegal char <"> at index 46: C:\Users\TestUser/.fontist/fonts\filenotfound_"source code pro".ttf
    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
ronaldtse commented 6 months ago

So the problem is our engine is assuming the file name contains double quotes.