Bug 1040 - Font space character width problem (GPU renderer)
Summary: Font space character width problem (GPU renderer)
Alias: None
Product: Jogl
Classification: JogAmp
Component: graph (show other bugs)
Version: 2.5.0
Hardware: pc_x86_64 windows
: --- enhancement
Assignee: Sven Gothel
Depends on:
Blocks: 1064
  Show dependency treegraph
Reported: 2014-08-03 21:05 CEST by picoworm
Modified: 2023-07-12 03:04 CEST (History)
4 users (show)

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description picoworm 2014-08-03 21:05:22 CEST
Library: jogl-2.2-b1103-20140709 windows amd64: 

The functions: 
1:  font.getGlyph(' ').getAdvance(fontSize, true); 
2:  font.getAdvanceWidth(Glyph.ID_SPACE, fontSize); 
return different result

Both of them must return the size of space character. 

this 2 functions is used inside jogl to determine width.
I looked inside source, and see that first function is used in font.getMetricBounds function to get size of string. 
And second one is used in drawString3D, to render the string 

So font.getMetricBounds return wrong value when space character inside a string
Comment 1 Sven Gothel 2023-07-12 03:04:11 CEST
Whitespace resolved