Skip to content

Font name with hyphen incorrectly read when importing PDF file (internal import)

Split from https://bugs.launchpad.net/inkscape/+bug/219709/comments/15

Summary:

When importing a PDF file which uses a font with a hyphen in its name, only the part up until the hyphen will be part of the font-family attribute.

Steps to reproduce:

  • open Inkscape
  • open test file test_file.pdf (internal import, default settings), which contains text in the font Unit-Light

What happened?

The text is rendered in default sans-serif. Triple-clicking it shows "Unit" as font name, which doesn't exist (the font is called Unit-Light).

The style attribute of the text reads

font-variant:normal;font-weight:normal;font-size:11.04px;font-family:Unit;-inkscape-font-specification:Unit-Light;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none

What should have happened?

font-variant:normal;font-weight:normal;font-size:11.04px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none

Sample attachments:

Version Info:

- Inkscape Version: 1.0 (4035a4fb49, 2020-05-01)
- Operating System: Windows 10
- Operating System version: ...
Edited by Jonathan Neuhauser
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information