Thanks Thomas, making the change you suggested works just great J And I think it makes a big difference too.
John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 August 2008 21:08 To: [email protected] Cc: [email protected] Subject: RE: Batik 1.7 text rendering issues Hi John, "John C. Turnbull" <[EMAIL PROTECTED]> wrote on 08/05/2008 06:23:41 AM: > What would be involved in getting Batik to take advantage of the > sub-pixel antialiasing in Java 6 for better font rendering? Is it a > big change? I'd like to implement it, at least in my local copy. It's a fairly small change, I think. Simply modify the function batik.bridge.CSSUtilities.convertTextRendering To set the java.awt.RenderingHints.KEY_TEXT_ANTIALIASING to one of the values of VALUE_TEXT_ANTIALIAS_LCD_*. I'm not sure how to determine the proper LCD_* value to use other than querying the user. > Also, what is the status of development of Batik? Is it still > actively being developed and/or enhanced? I would say that development is fairly passive right now. Important bugs and bugs with clear fixes are fixed regularly but we aren't adding many new features. Part of the reason we aren't adding new features is because our coverage of the SVG specification is pretty good. BTW our base JDK is currently 1.4 so I'm not sure we would add this anyway (especially given the complication of trying to figure out what LCD setting should be used). > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 5 August 2008 20:12 > To: [email protected] > Cc: [email protected] > Subject: Re: Batik 1.7 text rendering issues > > > Hi John, > > "John C. Turnbull" <[EMAIL PROTECTED]> wrote on 08/04/2008 09:17:36 AM: > > > I am looking at Batik for the first time and I have done a little > > bit of experimentation with the "text-rendering" attribute yielding > > some puzzling results. > > > > I would have thought that the option "optimizeLegibility" would > > produce the "nicest" text or at least the most readable but it seems > > that Batik does not use anti-aliasing at all with this option set. > > Right, when you use optimizeLegibility we render the text relying > on the font hinting to improve legibility at small font sizes. > The level/quality of the hinting varies a bit from font to font so > it may not be ideal. > > > However, when I specify the option "geometricPrecision" which I > > would have thought would result in plainer text, I do see anti- > > aliasing and the text is much more readable > > Setting 'geometricPrecision' means that the rendered text should follow > the raw geometry of the text as closely as possible (hinting > effectively distorts the outlines of the text to align it with the > pixel grid). It also means that we can't take advantage of > cached glyphs in most cases since a glyph at x="10.1" will render > differently from a glyph at x="10.6" due to anti-aliasing. > > >(although still not as readable or as clear as I would like it > > to be on an LCD screen). > > The very latest versions of the JDK offer options to do > 'sub pixel' rendering, however currently Batik doesn't try to > make use of them. > > > Is this is the intended behavior or am I misreading this whole > > issue? I am using Java 6 Update 10 on Windows Vista. > > AFAIK Batik's behavior is correct with respect to the > SVG specification.
