Bug 330 - Inconsistent handling of spaces in TextRenderer
Summary: Inconsistent handling of spaces in TextRenderer
Status: RESOLVED WONTFIX
Alias: None
Product: Jogl
Classification: JogAmp
Component: awt (show other bugs)
Version: 1
Hardware: All all
: P5 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2007-10-29 11:15 CET by Sven Gothel
Modified: 2012-01-23 00:09 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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