Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2003

Tip: Looking for answers? Try searching our database.

prob. with Font.createGlyphVector(frc, String)

Thread view: 
rico - 25 Aug 2003 08:11 GMT
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
Christian Kaufhold - 26 Aug 2003 01:37 GMT
Hello!

> 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.

Not reproducible. Please post a compilable example that shows this problem.


> 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...

"This return value is meaningless to anything other than the Font object
that created this GlyphVector."

Christian


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.