Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > prob. with Font.createGlyphVector(frc, String)

Reply
Thread Tools

prob. with Font.createGlyphVector(frc, String)

 
 
rico
Guest
Posts: n/a
 
      08-25-2003
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57