4

I created a simple example plot in R and exported it as a PDF. I use Inkscape to create an SVG file. However, I have noticed that the font is different when I use the internal library to import the plot, compared to importing with Poppler/Cairo. This behavior also occurs when I uncheck the "Replace PDF fonts by closest-named fonts" option for the internal library.

It seems that the font with the internal library is slightly smaller and less bold. However, when I make the font bold in Inkscape, it is much larger. In the following I show only the title of the plot, because there the difference is most apparent.

Any suggestions on how to circumvent this behavior of the internal library? Because the font seems to match the PDF when I import with Poppler/Cairo. The reason I would prefer importing with the internal library is the smaller file size.

Import with Poppler/Cairo:

enter image description here

Import with the Internal Library:

enter image description here

1
  • 1
    Hi. Welcome to GDSE. Did you read the text in the PDF import dialog? It explains exactly what is going on. See this screenshot. Poppler/Cairo imports text as paths, and Internal keeps text as text.
    – Billy Kerr
    Sep 19, 2021 at 18:08

1 Answer 1

5

'Poppler/Cairo import' basically converts all text to paths while 'Internal import' keeps it as text objects.

The reason they seem to have different thickness is probably because of 'hinting' which is a mechanism used when rendering fonts that aligns the text outlines to the pixel grid, making them look sharp at any resolution. Regular paths however don't use hinting, thus don't align to the pixel grid and have slightly blurry outlines due to anti-aliasing.

You can manually convert text objects to paths with 'Path → Object to Path', but you'd also lose all the benefits of text objects like editability and smaller file size.

Personally, I'd recommend just leaving the text objects as text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.