Open jdtuck opened 9 years ago
That's pretty strange. I've not been able to reproduce this. Can you tell me what version cairo and pango are installed on your system?
The versions for cairo is 1.14.2 and pango 1.36.8
I have looked more into this and it seems to be coming from cairo, if I export the SVG directly and few in firefox, looks good, but any conversion to PNG, PDF, etc. and the superscripts are rendered wrong. Even if you open the SVG in inkscape things are wrong. Thoughts?
I'm not sure what's going on. Maybe try changing the font for those labels by adding something like:
Theme(minor_label_font="courier")
to plot
. I wonder if it's just something peculiar with the font cairo is choosing.
Actually just tried something, it works fine when the DPI setting is removed, might be getting somewhere. It looks as thought there might be bug when the DPI is set manually and increased. I am not familiar with the workings of Compose.jl.
Sorry, I completely missed the dpi
setting. I'm getting the same thing now.
It looks like pango does superscript by raising the text some fixed amount: (https://github.com/GNOME/pango/blob/master/pango/pango-markup.c#L1482)
In cairo that translates to raising the text by a fixed number of pixels, regardless of the text size. Surprising, since that seems like an entirely wrong thing to do. I guess I need to to set the rise manually, since pango can't be trusted to do it correctly.
That makes complete sense and I would agree pango's approach is not the right thing to do. Thanks
I just ran into this bug. Are there any workarounds?
When executing the following plot the SVG renders with easy to read exponents on the labels
however, once it is rendered to the a backend using
the exponents are hard to read. Thoughts on what I am doing wrong or how to fix it? Thanks