Bug report #3975

PDF exports on OSX always convert text to outlines

Added by Barend Kobben over 13 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:mac_os_specific
Affected QGIS version:master Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:13972

Description

When using the new labeling engine, text is changed into vector paths when using the Print Composer printing to SVG and PDF.

Using the old labeling, and SVG output from the print composer, you end up
with SVG TEXT elements, and therefore text that is still editable (eg in
Illustrator), fonts can be changed, etc. Using the new label engine, no matter
what settings you use, the text is beautifully placed, but useless for
further editing because its vectorised, i.e. turned into paths. Instead of TEXT elements there are PATH elements. BTW, the PDF output has the same problem, but that was already the case with the old labelling engine also.

This is dissapointing, as the new labelling engine is so much better (and
I suppose we are planning to dismiss the old one in the future anyway),
but losing the editability is a real pain.

I am using QGIS 1.6.0 and 1.5.0 on a MacOSX Snow Leopard installation, but confirmed "it is the default behaviour on windows/linux/macos".

test.pdf (833 KB) Alister Hood, 2015-01-08 12:51 PM

windows_outlines_pdf.pdf - PDF text as outlines (or otherwise not editable). (813 KB) Nick S, 2015-05-18 01:39 PM

Associated revisions

Revision 1eaf95a8
Added by Nyall Dawson almost 6 years ago

[api] Move setting to control how text is rendered to QgsRenderContext

The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975

Revision 19211817
Added by Nyall Dawson almost 6 years ago

[layouts] Fix fragile option to export text as text in SVG exports

Refs #3975

Revision 7c5a74d7
Added by Nyall Dawson almost 6 years ago

[api] Move setting to control how text is rendered to QgsRenderContext

The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975

(cherry picked from commit 53345c3f9242ae5a369f807a68ca4b334382913d)

Revision 0e694eab
Added by Nyall Dawson almost 6 years ago

[layouts] Fix fragile option to export text as text in SVG exports

Refs #3975

(cherry picked from commit 1d04105c6a0398728d6a5c4c63bb09d3148aa034)

History

#1 Updated by Paolo Cavallini about 13 years ago

  • Category set to Symbology
  • Pull Request or Patch supplied set to No

#2 Updated by Giovanni Manghi almost 13 years ago

  • Target version set to Version 1.7.4

#3 Updated by Paolo Cavallini over 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#4 Updated by Alister Hood over 12 years ago

  • OS version deleted (10.6.7)
  • Category changed from Symbology to Labelling
  • Target version deleted (Version 1.8.0)
  • Operating System changed from Mac OS X to All

I guess the category should be either "labelling" or "Printing".

#5 Updated by Paolo Cavallini about 12 years ago

  • Target version set to Version 2.0.0

#6 Updated by Anita Graser about 12 years ago

  • Priority changed from Normal to High

#7 Updated by Giovanni Manghi almost 12 years ago

  • Priority changed from High to Normal

#8 Updated by Jigdo Stunk over 11 years ago

This is becoming a serious issue. It is impossible to select an multiline label in a QGIS svg export when using Inkscape or other svg editing programs. This flaw has been languishing for years and needs to be fixed.

#9 Updated by Larry Shaffer over 11 years ago

Hi Jigdo,

Hopefully it will be fixed this week. I have it working, but with some scaling issues.

#10 Updated by Jigdo Stunk about 11 years ago

This is most certainly NOT FIXED. It wasn't fixed in 1.9 development, and it is not fixed in 2.1 development, and it is not fixed in 2.0 release!
The release notes said it was fixed, but the problem still exists. All label text exported to svg from the print composer is still exported as PATHS AND NOT TEXT. It is unusable, at least on Debian Wheezy 64 bit.

Is there some secret setting I should know about? Is your documentation correct?
What is going on?

#11 Updated by Giovanni Manghi about 11 years ago

  • Target version changed from Version 2.0.0 to 70

The release notes said it was fixed, but the problem still exists.

weird. if this ticket was now closed then I suppose that this means it was now fixed. Can you point me to the note?

PS
There is no guarantee that a bug will be fixed in time for a release, unless someone is committed (or paid) to fix it in time for a deadline.

#12 Updated by Larry Shaffer about 11 years ago

  • Target version changed from 70 to Future Release - High Priority
  • Assignee set to Larry Shaffer

Hello Jigdo,

This issue is not fixed. The release notes are incorrect if it is indicated that the issue was fixed. Please point us to where this is noted.

#13 Updated by Jigdo Stunk about 11 years ago

I found issue 3975 listed in the changeset at https://issues.qgis.org/wiki/quantum-gis/New_Labeling_changes_and_roadmap. Evidently, it did miss the release, as well as missing the 2.1 nightly.
Do we have to wait another week? Why has this issue not been fixed? It is serious.

#14 Updated by Larry Shaffer about 11 years ago

Jigdo Stunk wrote:

I found issue 3975 listed in the changeset at https://issues.qgis.org/wiki/quantum-gis/New_Labeling_changes_and_roadmap. Evidently, it did miss the release, as well as missing the 2.1 nightly.

As evidenced by other listings on that page (which is not an official changeset for the 2.0 release), there is no checkmark next to this issue, i.e. it has not been fixed. I have maintained that wiki page, and it now needs updated to reflect 2.1 release goals. Issues still needing fixed, will be moved to 2.1 roadmap.

Do we have to wait another week? Why has this issue not been fixed? It is serious.

I understand that the issue is significant, and it is a workflow frustration (even to my work). However, it will not be fixed until it is verifiable that the fix does not break something else in output. There were never any unit tests for labeling, and the possible permutations of options to test manually is staggering. I have now made a decent framework for testing a single suite across all outputs (canvas, composer, server), but it is not yet complete. Once complete, the framework needs fully tested across several platforms.

There are many forms of labeling output and variations across/within platforms with the way fonts are handled. It is now imperative that any significant changes to output be verified as OK, ideally before being committed: this is one of them.

If you would like to help fund the volunteer work on this, please contact me or someone in the steering committee.

#15 Updated by Jigdo Stunk about 11 years ago

That is a lame excuse for leaving a bug languishing for years. How many more YEARS do we have to wait to fix what has alway been a REGRESSION? I HAVE been volunteering my time, for MANY YEARS now with qgis, trying to make some use of it other than as a quick shapefile viewer. Please don't suggest that perhaps if I paid there might be some progress, because from everything I have seen regarding QGIS for the last SEVEN YEARS, there is nobody there capable of anything except making lame excuses. In those SEVEN YEARS I have referred to, I have learned enough to know that it will just be easier to use the new HTML5 spec and draw my own shapes with SVG using Java Server Pages to build a postgis db connected webapp and use Firefox to render the view. That is correct, Firefox has better capability than QGIS, and has it RIGHT NOW while the QGIS team (which said this bug was fixed 3 months ago but now says it wasn't really) neglects even maintaining previous functionality.
This bug has just GOT to have a better timetable than the no timetable described in the previous post. Are we going to see a fix for this in the 2.1 nightly?

#16 Updated by Barend Kobben about 11 years ago

While I do certainly do not agree with the tone of the previous commenter, I must admit I am also rather disappointed by the bug lingering so long. I originally filed this in nov 2011. And the worst thing is that the workaround disappeared, since the 'old' labelling engine (understandably) has been removed in 2.x.

Can anyone on the QGIS team give a clear estimate of:
- what has to be done to remedy the real world problem it causes (i.e. by getting real text labels in either SVG or PDF output)
- how much time that is expected to take
- how much funding would be needed
Then I might try to raise some of that funding, because I REALLY want this to move forward...

Barend Köbben

#17 Updated by Nathan Woodrow about 11 years ago

Jigdo Stunk wrote:

That is a lame excuse for leaving a bug languishing for years. How many more YEARS do we have to wait to fix what has alway been a REGRESSION? I HAVE been volunteering my time, for MANY YEARS now with qgis, trying to make some use of it other than as a quick shapefile viewer. Please don't suggest that perhaps if I paid there might be some progress, because from everything I have seen regarding QGIS for the last SEVEN YEARS, there is nobody there capable of anything except making lame excuses. In those SEVEN YEARS I have referred to, I have learned enough to know that it will just be easier to use the new HTML5 spec and draw my own shapes with SVG using Java Server Pages to build a postgis db connected webapp and use Firefox to render the view. That is correct, Firefox has better capability than QGIS, and has it RIGHT NOW while the QGIS team (which said this bug was fixed 3 months ago but now says it wasn't really) neglects even maintaining previous functionality.
This bug has just GOT to have a better timetable than the no timetable described in the previous post. Are we going to see a fix for this in the 2.1 nightly?

While you are frustrated, this is out of line. Most of this project is run on volunteer time, a lot of us have other jobs that need our focus. The code base is massive and complicated in places. We can't just jump in a fix something on demand if we are unsure, or even don't know how to do it. Larry has done a fantastic job with the labeling in 2.0. Considering he only joined the team after 1.8. Given the amount of work that went into 2.0 I would hardly call this lame excuses.

Being nasty to develpors is not going to get you what you want, no matter how you feel. The way Barend approached it is the better tone and will have more impact.

#18 Updated by Vincent Mora almost 11 years ago

I'm interested in adding export non-vectorized text as an option to the svg export.

Larry:is it the way to go ?

#19 Updated by Vincent Mora almost 11 years ago

  • Pull Request or Patch supplied changed from No to Yes

#20 Updated by Larry Shaffer over 10 years ago

  • Status changed from Open to Feedback
  • Target version changed from Future Release - High Priority to Version 2.4

The recent changes brought with the new multi-threaded renderer setup in QGIS 2.3-dev (dpi fixes) and the completion of the labeling unit test framework, allows for a reason solution to this.

I am working on finalizing a solution now. Please see: https://github.com/qgis/QGIS/pull/1096#issuecomment-39040544

#21 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#22 Updated by Barend Kobben over 10 years ago

This is very dissapointing, I got the impression the bug is on teh verge of being solved, and now its "Future Release" :-((

Repeating the questions I posed 9 months ago:
Can anyone on the QGIS team give a clear estimate :
- what has to be done to remedy the real world problem it causes (i.e. by getting real text labels in either SVG or PDF output)
- how much time that is expected to take
- how much funding would be needed
Then I might try to raise some of that funding, because I REALLY want this to move forward...

Barend Köbben

#23 Updated by Jürgen Fischer over 10 years ago

Barend Kobben wrote:

This is very dissapointing, I got the impression the bug is on teh verge of being solved, and now its "Future Release" :-((

This was just a batch update moving all open bugs that were set to target version 2.4 to "future release - high priority" (that hopefully means the next one),
instead of moving a bunch of stuff that was already moved from previous release targets to 2.4 to 2.6. IMHO tickets should only be moved to a particular version, if there is a clear intention to fix them in that release (or even better only if they were fixed in that release). Bugs should not be pushed from one release to another, simulating activity where there actually is none.

This applies to a good deal of tickets in the batch and even more to the second one with tickets that were assigned from earlier versions than 2.4 to "future release - lower priority". That's apparently they priority they actually have, whether we like it or not.

All that doesn't actually apply to this particular ticket. Is has seen other activity, has a pull request and is waiting for feedback. Following up the link pull request I see that there was c1d80ed6a6bdac03ed9d02d2f5bbaca17d2e1b8f. Looks like this is "already" initially fixed in 2.4.

#24 Updated by Barend Kobben over 10 years ago

Jürgen,
Thanks for that clarification. Nice to hear there is progress. If I can help in any way (other then actual C programming), let me know...
Barend

#25 Updated by Giovanni Manghi over 10 years ago

Barend Kobben wrote:

Jürgen,
Thanks for that clarification. Nice to hear there is progress. If I can help in any way (other then actual C programming), let me know...
Barend

can you test QGIS 2.4 and report back if the issue is fixed? thanks.

#26 Updated by Nick S almost 10 years ago

I still see this issue (on PDF export) in QGIS 2.6.1 running on Windows 8.1

#27 Updated by Barend Kobben almost 10 years ago

also still unsolved for SVG output. Note that before the new labeling engine, PDF export already did "outlines of text as paths" instead of original text objects, but SVG exports had the original texts which therefore remained editable. This disappeared with the new engine, and in spite of various messages in here that this was considered a bug and should be re-instated, it never did. Very disappointing.

#28 Updated by Alister Hood almost 10 years ago

At least in current git it is just an option which is disabled by default (I think I saw that this was either because it degrades performance or because fonts may not be universally available, or can't be embedded in a PDF by QT or something), and well hidden.
- Select any layer.
- Click "Layer>Labelling".
- Click the unlabelled button in the top right corner ("Automated Placement Settings").
- Uncheck "Draw text as outlines (recommended)".

Is this option mentioned in the documentation?

#29 Updated by Alister Hood almost 10 years ago

Should this issue be closed now?

#30 Updated by Alister Hood almost 10 years ago

Forgot to say "Woohoo - as well as getting real text in pdf export, this means I get decent (i.e. aliased) on-screen rendering if my system settings are right".
Thanks for the hard work on it.

#31 Updated by Barend Kobben almost 10 years ago

Well, on my setup [QGIS 2.6.0-Brighton on Mac OSX 10.9.5] getting "real" text does work for me when using SVG output, but PDF is still outlines regardless of the setting. For my purposes this is fine, and I am happy to have this real text option back, but if it was intended to also work with PDF it is still unsolved...

#32 Updated by Nick S almost 10 years ago

Thanks for pointing that out Alister! That's some great progress to see. In my case (QGIS 2.6.1 on Windows 8.1) Acrobat X Pro sees that labels as editable text, though it gives me some errors in editing it ("All or part of the selection has no available system font. You cannot add or delete text using the currently selected font") - that could just reflect my knowledge of Acrobat too though.

Another issue I observe is that while this fixes labeling, other text from the map composer is still drawn as outlines even with this option toggled off. For me, that's the real issue, but maybe that's a separate bug, so feel free to let me know if you need me to file a new bug report.

Thanks for everyone's work on this!

#33 Updated by Alister Hood almost 10 years ago

but PDF is still outlines regardless of the setting

It works for me on Linux (with qgis-git, like I mentioned). Since Nick says it works with 2.6.1 on Windows, I think you should try 2.6.1 to confirm if it is just an OSX issue.

Acrobat X Pro sees that labels as editable text, though it gives me some errors in editing it ("All or part of the selection has no available system font. You cannot add or delete text using the currently selected font") - that could just reflect my knowledge of Acrobat too though.

Does it do that with all fonts, or just some?
Do you get the same error with this file I produced on Linux? When I copy text from the PDF into a word processor it brings it across as the correct font.
It sounds like that may be a QT bug, and it may be platform specific.

#34 Updated by Alister Hood almost 10 years ago

Another issue I observe is that while this fixes labeling, other text from the map composer is still drawn as outlines even with this option toggled off.

Try testing with a map composer with just a single label on it. If that works for you (it does for me) then you've found an issue similar to the old bugs where at least part of the output was sometimes rasterised. If not, then either it's fixed in qgis-git, or is platform specific.

#35 Updated by Larry Shaffer almost 10 years ago

  • Target version changed from Future Release - High Priority to Version 2.8
  • Status changed from Feedback to In Progress
  • Priority changed from Normal to High

Ah, I see the confusion. The check box in the export dialog never got re-enabled, so you can't turn it on or off at that point, only in the Auto-placement Engine dialog. Dang, I think that's been since 2.4!

#36 Updated by Alister Hood almost 10 years ago

Notice these guys are also seeing issues with it though - maybe specific to Windows and Mac.

#37 Updated by Barend Kobben almost 10 years ago

I can confirm that after installing QGIS 2.6.1 (still on Mac OSX 10.9.5] getting "real" text does work for me when using SVG output (regardless of the confusing greyed out check box in the export dialog), but PDF is still outlines regardless of the setting in the Auto-placement Engine dialog.

#38 Updated by Giovanni Manghi over 9 years ago

  • Target version changed from Version 2.8 to Version 2.8.2

#39 Updated by Jürgen Fischer over 9 years ago

  • Target version changed from Version 2.8.2 to Future Release - High Priority

#40 Updated by Barend Kobben over 9 years ago

Can you guys (Giovanni and Jürgen) explain to me what is the problem in solving the bug? I would have not dreamt when filing it almost 4 years ago that it would prove to be such a hard one! It now looked like only a small last step was needed. Remember that not-outlining works now for SVG even though its unclear how to achieve due to GUI quirks. So what is the problem in making the GUI behave and/or achieving the same for PDF....?

#41 Updated by Barend Kobben over 9 years ago

Just confirmed the bug for MacOSX (10.9.5). Tested on linux and Windows, it works fine there. So the remaining problems are:
- PDF output of non-outlined text does not work on MacOSX
- GUI is confusing: Have to set "Automated Placement Settings" > Uncheck "Draw text as outlines (recommended)" in labelling dialog. In SVG export there is a greyed out check box which does not do anything

#42 Updated by Nick S over 9 years ago

I still see this issue in PDFs using QGIS 2.8.1 on Windows 10, even after unchecking the "draw text as outlines" box and unchecking the rasterize box in the composer. At the very least, Adobe Acrobat fails to recognize that it's text and won't edit it. See attached file for an example of what I'm getting when I export

#43 Updated by Nyall Dawson about 9 years ago

  • Subject changed from New Label engine vectorizing texts in (printed) output to PDF exports on OSX always convert text to outlines
  • Pull Request or Patch supplied changed from Yes to No

Composer SVG checkbox is enabled in 2.12. So I think the only remaining issue is that PDF outputs on OSX force text as outlines, which is likely an upstream Qt issue.

#44 Updated by Jürgen Fischer over 8 years ago

  • OS version set to OSX
  • Status changed from In Progress to Open
  • Assignee deleted (Larry Shaffer)
  • Priority changed from High to Normal
  • Resolution set to up/downstream

#45 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#46 Updated by Barend Kobben about 6 years ago

This VERY long running bug is still unsolved, The bug report reads like a soap opera, every time there seems to be some hope it’s solved, that hope gets squashed again. It went to almost solved back to being Open, form high to normal priority and no assignee, and easy fix is now set to No.

And to make things much worse, in 3.x now also the SVG output again always converts text to outlines, whatever setting you do in the dialog . We are now back to the workaround of several years ago that you have to turn the "text outline" off at the "Automated Placement Settings" in the Labeling engine, because that will always override the settings in the output dialog :-(

#47 Updated by Denis Rouzaud about 6 years ago

  • Description updated (diff)
  • Category changed from Labelling to mac_os_specific

#48 Updated by Kyle Sim about 6 years ago

Late to the party on this, but I was just trying to do this exact thing and all my text is converted to outlines, no matter how i export. And also the svg files are "invalid" too, so I'm only able to test this as pdf exports. I'm using qgis 3.2.3 on Mac High Sierra. I take it there's no workaround at all at this moment, even switching to PC version etc?

#49 Updated by Denis Rouzaud about 6 years ago

  • Status changed from Open to Feedback

I have been trying by unchecking 'Draw text as outlines' in the label settings

And it works as expected, I could copy/paste the text in the PDF (while cannot if the option is checked).

Am I missing something?
Would one wants this option to be set per layer rather than project wise?

#50 Updated by Barend Kobben about 6 years ago

Well, you’re missing the fact that all text is now cut up letter by letter....

That’s pretty useless, if you want to eg change the font each separate letter will be changed but the text as a whole wopn’t be eiditable and will look very ugly, because there is no letter/word spacing and kerning....

Compare this to the SVG output, where original words and sentences are still (editable) words and sentences. But then the SVG output of course has many other problems, so I am still suck with using both SVG and PDF and combining them later...

Barend

#51 Updated by Barend Kobben about 6 years ago

Barend Kobben wrote:

Well, you’re missing the fact that all text is now cut up letter by letter....

That’s pretty useless, if you want to eg change the font each separate letter will be changed but the text as a whole won’t be editable and will look very ugly, because there is no letter/word spacing and kerning....

Compare this to the SVG output, where original words and sentences are still (editable) words and sentences. But then the SVG output of course has many other problems, so I am still suck with using both SVG and PDF and combining them later...

Barend

#52 Updated by Nick S about 6 years ago

This is still an issue in QGIS 3.2 on Windows 10 as well, though it has evolved. I can get text to export, but only if I uncheck the "Draw Text As Outlines" box and also check the "Always export as vectors" option in the Layout. The problem with that is that the "Always export as Vectors" option disables transparency and layer blending, so you lose a ton of cartographic power in exchange for it. Still feels like a bug if labels are being either rasterized or drawn as outlines without that option.

#53 Updated by Denis Rouzaud about 6 years ago

  • Status changed from Feedback to Open

#55 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Open to Closed
  • Resolution changed from up/downstream to fixed/implemented

Also available in: Atom PDF