A discussion forum for JFreeSVG (a fast, lightweight, SVG generator for the Java platform).
3 posts • Page 1 of 1
Running JFreeSVG on AWS/OpenJDK 1.7.0_51 and the text measuring appears to be off quite a bit (see the left chart in the image above). The chart on the right was generated on my Windows development machine running identical code.
My first thought was the font (Arial) was not installed on the AWS instance. This turned out to be the case so I installed the MS Core Fonts and verified that Java can see them. It did not fix the measuring problem, however.
Any ideas what might be wrong here?
- JFreeChart Project Leader
- Posts: 11706
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
It certainly looks like it is measuring with a different font. One thing to try would be to set this rendering hint (new in version 2.0):
It will take the font that is available on the server and, instead of writing text as characters it will fill the outlines of the individual glyphs. This will result in a large(r) SVG file, but it should make it easy to see if the wrong font is being picked up on the server.
Code: Select all
JFreeSVG 2.0 is a big improvement. The vector option did confirm the correct font is being used but we can't use that as the text needs to be selectable for copy/paste.
I'll update the thread if I figure out a solution.