diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-12-05 17:47:45 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-12-05 17:47:53 +0000 |
| commit | f45c0191ca0797a39d98b0ddad3a79e6e1efad4c (patch) | |
| tree | 990d005d64022c29a9dddeaf53e86cf2f5b1ff56 /src | |
| parent | Update by VinÃcius Lopes pt_BR.po (diff) | |
| download | inkscape-f45c0191ca0797a39d98b0ddad3a79e6e1efad4c.tar.gz inkscape-f45c0191ca0797a39d98b0ddad3a79e6e1efad4c.zip | |
PDF+LaTeX export: Avoid printing empty boxes
This also fixes an issue with multipage PDF output where an empty
string would have been assumed to require emission of the previous
page when in fact the CairoRenderer does not produce a new page in
this case resulting in another facet of
https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1417470
Invisible characters might still cause this issue but it seems to be
a very unlikely scenario and there's no way to know this without
actually rendering the glyphs (which seems to be overkill here)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/latex-text-renderer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp index d1cf7e484..3e90881ac 100644 --- a/src/extension/internal/latex-text-renderer.cpp +++ b/src/extension/internal/latex-text-renderer.cpp @@ -260,6 +260,11 @@ void LaTeXTextRenderer::sp_use_render(SPUse *use) void LaTeXTextRenderer::sp_text_render(SPText *textobj) { + // Nothing to do here... (so don't emit an empty box) + // Also avoids falling out of sync with the CairoRenderer (which won't render anything in this case either) + if (textobj->layout.getActualLength() == 0) + return; + // Only PDFLaTeX supports importing a single page of a graphics file, // so only PDF backend gets interleaved text/graphics if (_pdflatex && _omittext_state == GRAPHIC_ON_TOP) |
