Hi all,
it seems that there is a problem with rendering bold and/or italic fonts correctly which are *not* installed on the system but only put into the %GEOSERVER_DATA_DIR/styles folder.
The GS loads the font and renders it. However, if the font-weight is specified as 'bold' or the font-style as 'italic' in the SLD, the display is not quite correct. It is, however, correct for the 'normal' font-style/weight.
Now I made some tests and found out that the bold/italic fonts are correctly rendered only if they are installed on the system or put into the $JRE_HOME/lib/fonts folder. Then the web interface also recognises all font types as "being installed in the JVM". This is not the case (deliberately?) if the fonts are instead being put into the styles folder.
I attached some screenshots to illustrate the issue and show the slight differences in rendering. The geometry with the star fill gets the different font-styles assigned while the other geometries have the normal style. The screenshots with *_JRE.png show the correct rendering, those with *_styles.png the wrong one.
I tested this exemplarily with the font "Gudea" from Google Web Fonts (cf. http://www.google.com/fonts/specimen/Gudea) but it also happens with plain Arial...
I have three separate .ttf files for each font styling, i.e. "Gudea-Bold.ttf", "Gudea-Regular.ttf" and "Gudea-Italic.ttf".
My setup is:
- Ubuntu 13.04
- GeoServer 2.3.0
- Java version: Sun Microsystems Inc.: 1.6.0_45 (Java HotSpot(TM) Server VM)
The workaround to just install the fonts in the JVM is basically O.K. but can get annoying if you have many fonts and servers. I'd prefer the solution to have the fonts in the styles folder so if anyone knows anything about this issue I would appreciate any help!
Thanks in advance and best regards,
Matthias