text to paths makes text bigger in PDF

Asked by linuxjh

Hi,

I export two PDFs, One with "covnert text to paths", the other without.
The text font in the PDF with "text to paths" are bigger compared to other PDF.
Text overlap occurs in the PDF with "text to paths" too.

How is that?

Can I export text to paths PDFs without enlarging text font and without text overlap?

Thanks

https://raw.githubusercontent.com/linuxjh/repo/master/misc/pdf1.pdf
https://raw.githubusercontent.com/linuxjh/repo/master/misc/pdf2-text-to-paths.pdf

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
linuxjh
Solved:
Last query:
Last reply:
Revision history for this message
linuxjh (linuxjh) said :
#1
Revision history for this message
Hachmann (marenhachmann) said :
#2

What happens if you convert the texts to paths in Inkscape already?
(do this with a copy of the document, or place a copy on a separate layer)

Revision history for this message
TylerDurden (8thrule) said :
#3

I have seen this issue for many years.

You might try this workaround:

Manually convert all texts to paths.
Enter each text group (faster is to combine all text ).
Activate node tool and select all nodes.
Convert all segments to curves ( this should not change any shapes).
Save and export to pdf.

Theory of operation: Export to pdf looks at vertical/horizontal straight line segments and attempts pixel fitting. Conversion to curve in XML stops pixel fitting.

Example: https://www.dropbox.com/s/xn9upi4dkt82nfy/t2p-1.zip?dl=0

TD

Revision history for this message
TylerDurden (8thrule) said :
#4
Revision history for this message
linuxjh (linuxjh) said :
#5

> TylerDurden (8thrule) said on 2018-01-29: #3
> I have seen this issue for many years.

> You might try this workaround:

> Manually convert all texts to paths.

Hi Tyler,

I still need this "text to path" steps first if I'm going the "segment to curve" way, right?

> Enter each text group (faster is to combine all text ).
> Activate node tool and select all nodes.
> Convert all segments to curves ( this should not change any shapes).
> Save and export to pdf.

> Theory of operation: Export to pdf looks at vertical/horizontal
> straight line segments and attempts pixel fitting.
> Conversion to curve in XML stops pixel fitting.

CairoRenderContext::_showGlyphs function is used to handle "text to path" in Inkscape 0.91.

How Can I implement "segment to curve" in a similar way?

Or Can I just increase the line space for text in my case to avoid overlap?

Thanks

#0 Inkscape::Extension::Internal::CairoRenderContext::_showGlyphs (
    this=0x12e871c8, cr=0x12cc4a98, glyphtext=..., path=true)
    at src/extension/internal/cairo-render-context.cpp:1635

...

#13 0x00545609 in Inkscape::Extension::Internal::pdf_render_document_to_file
    (doc=0xa9c4f50,
    filename=0x10e85fa8 "> D:\\project\\inkscape\\inkscape\\strXML2.pdf",
    level=1, texttopath=true, omittext=false, filtertobitmap=false,
    resolution=96, exportId=0x0, exportDrawing=false, exportCanvas=true,
    bleedmargin_px=0)
    at src/extension/internal/cairo-renderer-pdf-out.cpp:106

Revision history for this message
TylerDurden (8thrule) said :
#6

Hi,

I only use the GUI. So, I convert text to path, then use node-tool controls to select and change straight segments to curves.

(Shift+U )
"Make selected segments curves. One or more segments must be selected. Segments remain straight lines but handles are extended that can be used to change the curvature." http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Editing.html#Paths-Editing-Node

More later,

TD

Revision history for this message
linuxjh (linuxjh) said :
#7

Hi,

I increase the line spacing and letter spacing. The most of the overlap get away. Only the "rv" letters still overlap. Seems we have some problem with the letter spacing.

New:
https://raw.githubusercontent.com/linuxjh/repo/master/misc/text-to-path-illustrator-outline.png

Old:
https://raw.githubusercontent.com/linuxjh/repo/master/misc/pdf-text-to-paths-illustrator-outline.png

Revision history for this message
linuxjh (linuxjh) said :
#8

Hi,

I convert individual text group (flowRoot) with Path / Object to Path and save it as PDF (without text to path option on the dialog). Those text don't overlap in Adobe Illustrator outline view.

Revision history for this message
linuxjh (linuxjh) said :
#9

I use this function: sp_selected_path_to_curves() same as the "Path / Object to Path" to output the Outline PDF.

The result output PDF seems better than the one exported by the function: pdf_render_document_to_file() used for "Save as / text to path".