prob. with Font.createGlyphVector(frc, String)

R

rico

When the Glyphvector returned by the method
Font.createGlyphVector(frc, String) is displayed, leading spaces are
trimmed and this is a problem because I need to map coordinates in pixels
to characters in a String.

At a suitable breakpoint, I analyse the GlyphVector object and see that the
glyph code for space character is equal to 3 and for 'L' it's 47, 'E' is
40...
From the documentation this is the one-to-one mapping to the font's
(Courier) Unicode cmap. But u0003 I believe is a control character,
i.e END OF TEXT and 'L' is u004C, i.e 76 , and 'E' is u0045, i.e 69...

Am I misinterpreting the values in the int[ ] , glyphs , in the GlyphVector
object?
The String " L E" is displayed as "L E", even though all spaces are coded as
3 ...

What are these values that the Eclipse debugger is giving me? Thanks.

Rico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top