Bug 293

Summary: TextRenderer: width of strings with spaces not correct in RC4
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: all   
URL: http://www.embege.com/misc/textrenderer.zip
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:50:23 CET


---- Reported by emzic 2007-04-18 01:36:31 ----

hello, i noticed that the calculated width of strings via getBounds() is not 
exactly the real width that is drawn on the texture. i believe it has something 
to do with the spacewidth in RC4, since in RC3 this works fine.

here is a testcase that demonstrates the difference betweeen RC3 and RC4:

http://www.embege.com/misc/textrenderer.zip

just two classes, should compile fine with RC3 and RC4.
just type something with spaces in the red line and then use the mouse to 
position the cursor. you should see that the cursor behaves correctly in RC3 
and is off by some pixels in RC4.

thanks a lot!



---- Additional Comments From kbr 2007-10-08 22:58:09 ----

Integrated John Burkey's new TextRenderer implementation using
glyph-by-glyph caching for most cases, with fallbacks to
String-by-String caching for complete Unicode correctness. New
implementation yields drastic performance improvements for
applications displaying large amounts of dynamic text. Upgraded JOGL
demos to work with new TextRenderer.

This checkin fixes at least the following issues:

Issue 261: Throttle shrinking of backing store texture for TextRenderer
Issue 293: TextRenderer: width of strings with spaces not correct in RC4
Issue 294: TextRenderer: rendering stops when a string is wider than the maximum
texture size
Issue 304: TextRenderer rendering artifacts in 3D mode

as well as outstanding performance issues with the current
TextRenderer reported on the JOGL forum.




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

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