[JAVA2D] How do I turn on kerning?

2008-01-27 Thread java2d
I am trying to use kerning when displaying text using the following code: [code] MapTextAttribute, Object textAttributes = new HashMapTextAttribute, Object(); textAttributes.put(TextAttribute.KERNING, TextAttribute.KERNING_ON); textAttributes.put(TextAttribute.FONT, font);

Re: [JAVA2D] How do I turn on kerning?

2008-01-27 Thread java2d
I see that the font attribute overrides other attributes so I have now tried this: [code] MapTextAttribute, Object textAttributes = new HashMapTextAttribute, Object(); textAttributes.put(TextAttribute.KERNING, TextAttribute.KERNING_ON); textAttributes.put(TextAttribute.FAMILY, Serif);

Re: [JAVA2D] How do I turn on kerning?

2008-01-27 Thread Dmitri Trembovetski
Take a look at this preso if you haven't already: http://gceclub.sun.com.cn/java_one_online/2005/TS-3214/ts-3214.pdf Slides 42-43. And, of course: http://java.sun.com/docs/books/tutorial/2d/text/textattributes.html Dmitri [EMAIL PROTECTED] wrote: I see that the font attribute

Re: [JAVA2D] How do I turn on kerning?

2008-01-27 Thread java2d
That didn't help but I have noticed that the examples on this page: ttp://java.sun.com/docs/books/tutorial/2d/text/textattributes.html show no effect with kerning on or off on my Vista machine but do show a difference on XP. Could this be a bug under Vista? -- And loving it, -Q

Re: [JAVA2D] How do I turn on kerning?

2008-01-27 Thread Phil Race
Dmitri's pointers are valid. Vista shouldn't make a difference to 2D since the code isn't OS specific and isn't making any OS provided calls. Perhaps the fonts just aren't the same. I do believe that Times New Roman etc were expanded for Vista. Still, that is surprising. Don't have Vista handy

Re: [JAVA2D] How do I turn on kerning?

2008-01-27 Thread java2d
I have done a bit more testing by adding setting of ligature attributes and the results are the same: no kerning on Vista x64 but kerning working on XP. Actually, I am using JSE 6 Update 10 (b11) so perhaps it has something to do with that? I'll post in the appropriate forum for that release