size of bold Font incorrect using FontMetrics

Hi, i am buisy developing a textarea that can diplay images and color text using awt classes. I use FontMetrics to determen the size of the text so i dont have picutres in the middle of my text, but for some reason when i use a bold font the size is incorrect and the text becomes too long to display on my canvas.

Does anybody have any idea why this happens and is there a solution or workaround available?

Thanks for your time

Robert

[467 byte] By [borg-javadrone] at [2007-9-26 8:24:00]
# 1
I dont remember the awnser, but I know this topic has been up in the forum before, and it was awnsered. Try searching.
Ragnvald at 2007-7-1 18:59:39 > top of Java-index,Desktop,Core GUI APIs...
# 2
Are you summing up the widths of individual characters or the whole string ?
ashutosh at 2007-7-1 18:59:39 > top of Java-index,Desktop,Core GUI APIs...
# 3
i am getting the size of the whole string, to determen where the picutre should start/ the text should stop because its the end of the canvas. works ok for plain and italic but works incorrect using bold
borg-javadrone at 2007-7-1 18:59:39 > top of Java-index,Desktop,Core GUI APIs...