Strange font when opening this pdf file

Bug #1497223 reported by Frédéric Parrenin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

Bug reproduced on debian jessie using inkscape 0.91
Steps to reproduce:
- open page 7 this pdf file with a pdf viewer, e.g. evince
=> observe that the font in the orange box has normal spacing
- now open the same page in inkscape
=> the font in the orange box has a very small spacing, letters are sometimes touching each others
It should not be a problem of font availability, since the font is OK in evince

Revision history for this message
Frédéric Parrenin (parrenin-ujf) wrote :
Revision history for this message
Frédéric Parrenin (parrenin-ujf) wrote :

Manually modifying the font to sans-serif, Bold, size=8 gives an acceptable font, close to the one rendered in evince.

Revision history for this message
Frédéric Parrenin (parrenin-ujf) wrote :

Note also that the "i" letter in "Figure", last line, is missing.

Revision history for this message
Frédéric Parrenin (parrenin-ujf) wrote :

Another issue, steps to reproduce:
- select the text in the orange box
- go to "text" and then "text and font"
=> the text properties (font family, style, size, line spacing, etc.) are not automatically detected.

Revision history for this message
su_v (suv-lp) wrote :

On 2015-09-18 12:49 (+0200), Frédéric Parrenin wrote:
> It should not be a problem of font availability, since the font is OK
> in evince

As a PDF _viewer_, evince uses fonts embedded and subset in PDF files. Inkscape can only use fonts installed on the local system for rendering text as text (feature requests to import and convert (subset) fonts from PDF files to SVG fonts, and to add support in Inkscape to use such embedded SVG fonts when rendering SVG text objects on-canvas are tracked in earlier reports. SVG fonts are deprecated though and will be dropped from future SVG specifications).

In Inkscape 0.91, you can choose 'import via poppler' as alternative PDF import - this will import text as paths, reusing the glyph data from the fonts embedded in the PDF file. The text however is no longer editable as text.

tags: added: fonts importing pdf
Revision history for this message
su_v (suv-lp) wrote :

Attached is the output of poppler's pdffonts for page 7 of the PDF file this report is based on.

On 2015-09-18 12:49 (+0200), Frédéric Parrenin wrote:
> => the font in the orange box has a very small spacing, letters are
> sometimes touching each others

The text on page 7 uses embedded and subset fonts of the family 'Frutiger LT Pro' in various sizes and weights (see attached output of poppler's pdffonts); unless fontconfig/pango can find identical fonts matching the font specification available in and extracted from the PDF file (via poppler), the text will be rendered in Inkscape with substituted fonts (based on the font matching rules of the font backend on the local system). These substituted fonts might have differ in various aspects from the originally used fonts (e.g. in metrics), and - since embedded fonts in PDF files do not contained any kerning data and text set in PDF files does not use kerning (each letter (or cluster of unkerned characters) is individually positioned on the page) - the same text rendered with a fallback substitute font with possibly different font metrics may look badly kerned when rendered in Inkscape.

The underlying issue of this report is the same as for
* Bug #1497252 Anormal degree sign when importing a pdf file

Inkscape (a vector graphics editor, not a PDF viewer) does not use embedded fonts from the original PDF to render SVG text objects in the SVG structure built based on the parsed PDF page - the text is rendered with a matching font found among the locally installed fonts. The font matching rules are part of the local system's font backend (on linux: fontconfig/pango).

To be considered: even if there existed a method/mode in Inkscape of converting the embedded font information into an external font file or an embedded SVG font which then could be used in Inkscape for rendering the corresponding SVG text elements (such a feature is not available), this would be of quite limited use: fonts embedded in PDF files usually are subset (to protect fonts distributed with a proprietary license, to keep the file size at a reasonable size). Subsetting a font means that the embedded font only contains the actually used glyphs, but never the full character set of the original font. Editing such text imported as text from a PDF page thus would be limited to whatever can be expressed with the available glyphs, and - due to the lack of kerning tables in the embedded fonts - would likely appear to be badly formatted (no kerning to adjust the spacing between certain pairs of letters). Characters in the edited text which are not covered by the embedded font(s) would have to be rendered with a different (locally installed) font.

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.