PuffinPlot issue tracker

Bug: a88/698

ID : 698def95-724d-44fb-9088-d3d7192e98ef
Short name : a88/698
Status : fixed
Severity : minor
Assigned :
Reporter : Pontus Lurcock <pont@talvi.net>
Creator : Pontus Lurcock <pont@talvi.net>
Created : Tue, 18 Nov 2014 08:31:52 +0000
Target : 1.03
Summary : Superscripts print wrong on OS X

Comment: --------- Comment ---------
ID: aae43e66-ecf9-4f07-abf5-a468740c6239
Short name: a88/698/aae
From: Pontus Lurcock <pont@talvi.net>
Date: Tue, 18 Nov 2014 09:04:27 +0000

On-screen superscripts are fine in recent OS X Java versions, but
printing on OS X Java 7 is hopeless: it appears that every superscript
character is shifted down by about five line-heights, with the offset
compounding for each successive character! The most obvious workaround
is of course to export a PDF file and print that, and I can't think of a
use case which wouldn't be served by this technique. But it's still
unpleasant to have an obvious bug.

First thing to do is to test on OS X Java 8. If it works there, there's
no problem, since Java 8 is currently the default version for OS X.
(Java 7 will be retired in April 2015.)

Failing that, I should add a workaround to the plotting code
specifically for printing on OS X. It would be possible to reinstate the
"fake" superscript I used to use for OS X Java 5 (which had a similar
bug) -- however, this was always a little fragile, since the affine
transform implementations that it used were also buggy. Since I don't
have the resources to test much on OS X (and since probably few people
care about this bug) the best compromise is probably to use "e" notation
on Mac printouts -- e.g. "e-5" for "×10⁻⁵". It's tempting simply to use
the Unicode code points for pre-superscripted digits and minus sign, but
unfortunately not all fonts have glyphs for these.


Comment: --------- Comment ---------
ID: d1de3766-dead-46a3-95e4-53bc664fa12b
Short name: a88/698/d1d
From: Pontus Lurcock <pont@talvi.net>
Date: Tue, 18 Nov 2014 14:05:22 +0000

Tested on Java 8; same behaviour, unfortunately. I will implement the
E notation workaround.