Page 1 of 1

superscript axis labels

Posted: Wed Apr 01, 2015 3:15 pm
by vrmitch
Hello,

When we format axis labels to a string representing a number with a superscript exponent, the spacing and exponent can sometimes render strangely. Sometimes there will be a space between exponent characters, sometimes labels will seemingly have extra spaces after them, and in the end it just looks wonky. The BatangChe font is a quick example.

I've attached a screen snip as an example.

**Update: I should emphasize that this is with certain fonts - a lot of them actually. BatangChe is just one example.

Re: superscript axis labels

Posted: Thu Apr 02, 2015 7:19 am
by ArctionLasse
I'm afraid that the problem is that the used font does not support all of the used characters. As a result the system falls back to using some other font, that contains the given characters. As the characters can be of different shape & size, the result can be a bit erratic. This is an internal operation of the underlying font rendering system, and can not be easily controlled.

I'd suggest that you try to find a font that has all the required characters defined.

In the case of BatangChe, the missing superscript numbers are 0, 5, 6, 7, 8 and 9. On MS Word 2010 the font used for the missing numbers seems to be MS Mincho. The numbers from 1 to 4 exist in the BatangChe font, but are defined so that they take a lot of empty space on their right side.

The existence of the characters in a given font can be easily checked using an editor like Word or Windows Character Map software.

The following image shows a sample text of super- and subscript numbers rendered by Word and LightningChart Ultimate, using the BatangChe font. The Character map shows part of the fonts unicode table at position of 0x2081, where subscript numbers ought to begin. The font contains definition only for numbers 1, 2, 3 and 4.

Re: superscript axis labels

Posted: Fri Apr 03, 2015 11:58 am
by vrmitch
You are absolutely correct! I've restructured the program to replace the scientific notation superscripts with a caret ^.

Thank you much!