I'm replying to my own post with some news.
A more direct way to see the problem is the following:
1. Create an Inkscape document with some fonts, say Syntax and Syntax Bold.
2. Save as pdf. The pdf displays ok (of course, since the fonts are embedded).
3. Both fonts appear in the pdf file with the same name "Syntax", the weight suffix has been removed.
4. Importing the pdf back into Inkscape maps both fonts to Syntax, so the weight information is lost.
I haven't found a way to prepare a pdf so that Inkscape identifies all the fonts properly. However, it is possible to fix the fonts after opening the pdf in Inkscape and saving as an svg by simply replacing the font names in the svg file. It can be done with your favourite text tool, under linux I used
sed file1.svg -f svgfontmap.sed > file2.svg
where the svgfontmap.sed file contains, e.g.,
Code: Select all
s/-inkscape-font-specification:Syntax-Roman/-inkscape-font-specification:Syntax/
s/-inkscape-font-specification:Syntax-Bold/-inkscape-font-specification:Syntax Bold/
s/font-family:LibertyBT;/font-family:Liberty;/
s/-inkscape-font-specification:LibertyBT-Regular/-inkscape-font-specification:Liberty/
s/font-family:Kuenstler480BT/font-family:Kuenstler 480/
s/-inkscape-font-specification:Kuenstler480BT-Black/-inkscape-font-specification:Kuenstler 480 Heavy/
Unfortunately there seems to be no simple way to find out how the names should be changed. I guess that this is the heart of the problem, as discussed in bug
179589. I think there will always be a need for human interaction. So a higher level interface to font replacement when opening pdf files would be very useful. It would not be so hard to link font names in a dialog where one could see the names in the document and the names available to Inkscape directly.