When exporting vector-graphics plots containing text, the individual glyphs are each stored as a separate object, rather than having a single object for each piece of text. E.g., text("foo") will produce three text objects "f", "o", and "o", with their own locations etc., rather than a single object "foo". Example below (each red box is a separate object):
This is rather disruptive for workflows that edit the exported figure post-export, e.g., in Illustrator or Inkscape, because it becomes impossible to resize the text or change fonts without the kerning getting ruined.
I previously asked about this on Slack a while back, and got a the following nice answer from @jkrumbiegel:
I had hoped to figure it out from those hints but haven't been able to grok it, so I'm just registering this here for posterity.
My understanding is that it requires replacing cairo_glyph_path with cairo_show_text_glyps, but that it also requires a different way of inputting the various text transformations.
When exporting vector-graphics plots containing
text
, the individual glyphs are each stored as a separate object, rather than having a single object for each piece of text. E.g.,text("foo")
will produce three text objects "f", "o", and "o", with their own locations etc., rather than a single object "foo". Example below (each red box is a separate object):This is rather disruptive for workflows that edit the exported figure post-export, e.g., in Illustrator or Inkscape, because it becomes impossible to resize the text or change fonts without the kerning getting ruined.
I previously asked about this on Slack a while back, and got a the following nice answer from @jkrumbiegel:
I had hoped to figure it out from those hints but haven't been able to grok it, so I'm just registering this here for posterity. My understanding is that it requires replacing
cairo_glyph_path
withcairo_show_text_glyps
, but that it also requires a different way of inputting the various text transformations.(Related to https://github.com/MakieOrg/Makie.jl/issues/2015, but not the same issue)