My Previous post was completely off the track :( TextAttribute.WIDTH applies to the width (condensed/regular/extended) of a font (duh!)
anyway... i can see that in order to properly kern some text I would have to use a GlyphVector with a custom glyph layout..
but I'm currently using a TextLayer to render text which centres around using AttributedStrings... so I'm somewhat stuck with
attributed strings until I rewrite my code (which I'm also working on...)
I've made up a simple GraphicAttribute which takes up a single metric unit width' of space.. (code below) and substitute this between
each letter to 'simulate' kerning (TextAttribute.CHAR_REPLACEMENT), unfortunately I seem to keep having a little square box being drawn on the baseline of the font, run this example to see what I mean... (I'm using jdk1.2.2 - if anyone doesn't see the little box on the bottom left of the 'J' mail me, i'll migrate to a different JVM...) has anyone else seen this annoying little box? know any way to get rid of it? i've checked the String i pass to the constructor of the AttributedString, but the first character is a 'J', not a UTF character of a box in the bottom right hand corner of the glyph :-)
 
   Thanks in advance,
   James Gardner.
 
 

Kerning.java

Reply via email to