Bug 330

Summary: Inconsistent handling of spaces in TextRenderer
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: awtAssignee: Sven Gothel <sgothel>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P5    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:51:01 CET


---- Reported by kbr 2007-10-29 11:15:34 ----

Patrick Murris from the NASA World Wind Java project reports that the
TextRenderer is returning inconsistent results for both strings with leading and
trailing spaces as well as the empty string:

"""
I have been putting together a very very simple html support to produce some
'moderatly wealthy' text... and i had to struggle and work around a couple
unexpected behaviors of getBounds():

1. getBounds() ignores leading and trailing spaces - draw doesnt.
2. getBounds("") does return a width of 2 pixels (Arial 12 plain) - draw paints
nothing.

I would have expected getBounds() and draw() to follow the same metric and refer
to the same bounds for the same string.
Is there something i am misunderstanding about space handling and empty strings ? 
"""



--- Bug imported by sgothel@jausoft.com 2010-03-24 07:51 EDT  ---

This bug was previously known as _bug_ 330 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=330