prob. with Font.createGlyphVector(frc, String)

Discussion in 'Java' started by rico, Aug 25, 2003.

  1. rico

    rico Guest

    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
    rico, Aug 25, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. powerman
    Replies:
    0
    Views:
    732
    powerman
    Apr 5, 2006
  2. Karl Hungus

    Font class, external font files question

    Karl Hungus, Feb 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    511
    Karl Hungus
    Feb 4, 2004
  3. Tina
    Replies:
    0
    Views:
    520
  4. Cree
    Replies:
    5
    Views:
    932
  5. mttc
    Replies:
    2
    Views:
    2,364
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page