iText SimSun Degree Symbol Spacing
Thursday, December 29th, 2011
I had a rather odd issue come up a few weeks ago for a client that generates data sheets for it’s Chinese distributors. These data sheets are generated via iText pdf using the SimSun font.
Below is a screen shot of the issue that came up when SimSun renders the degree symbol notice the trailing white space.
Since this was an actual issue with the font and the client requested that we not change the font due to Chinese standards I came up with the following solution.
SimSun supports the ‘Masculine Ordinal’ symbol. This symbol does not have the trailing white space that the ‘degree’ symbol does. So on the fly when it comes time for iText to generate a Chinese Datasheet I replace all Degree symbols with Masculine Ordinals. A little hacky but def the best solution available at the time.
myString.Replace('\u00B0', '\u00BA'); //replace degree with masculine ordinal


