GNOME Bugzilla – Bug 168467
Need to make "1E+10" same width as "1E-10"
Last modified: 2005-02-28 15:24:40 UTC
Bitstream vera sans' digits do not have the same width. That makes columns not look at good as they should.
We ought to be able to piggyback off DejaVu: http://dejavu.sourceforge.net/wiki/index.php/Main_Page
Ok, forget the font issue. Somehow my font setup was screwed. We're left with "1E+10" vs "1E-10" where the "+" is far wider than U002D. "+" has the same with as U2212.
U2212 is the math symbol "minus sign" while U002D is the punctuation "hyphen-minus". Hyphens are typically short while minus signs ought to be the same size as plus signs. I guess we `just' have to use U2212.
a1=-42 a2=code(left(a1,1)) That should yield 45 in a2, so any trick we do is going to be for the displayed string only. We probably do not want to map "-" to U2212 for strings, e.g., "almost-crazy example", but only for numbers. That would make the string "1E-20" look different from the number 1E-20. Feature?
That would make the string "1E-20" look different from the number 1E-20. with string "1E-20" do you mean a string whose third character is U2212 or U002D or U2010. THey will all look different. Anybody using TeX will be used to having minus, hyphen, n- and m-dashes all look different (as they should). Since a1=-42 a2=code(mid(a1,3,1)) gives 50 whether or not a1 is formatted as number or scientific, we obviously ignore formatting when we work with the number.
a1: '1E-20 String with U002D a2: = a1+0 Number, shown with U2212 a3: =left(a2,5) String again, U002D again. A man could get confused. It will appear as-if numbers are shown with a slightly different font.
Perhaps I don't understand the problem since as a LaTeX user -23 and $-23$ does end up looking quite different. And personally I would find it good having a better visual distinction between strings and numbers.
Fixed in cvs. Please pound on it and see if anything breaks over it.