Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inconsistent font ascents



hallo,

i'm having a graphics problem ; on a panther / java 1.4 machine (where i developed originally), text is displayed about 2 pixels below the same display on tiger / java 1.5 . at first i thought it was a bug in my code when calculating the y coordinate using fontMetrics.getAscent() . but as you can see in the screenshots, this vertical shift also applies to regular gadgets like JTextField and JLabel (the "markers" text on the top left is a JLabel) ... it looks particularly bad with custom gadgets where text placement is critical like the green-background marker in the screenshot. interestingly, the labelling of the axis seems to be the same ... i looked in the code, and yes, there is a difference : in the axis i use (for whatever reason ;-) fm.getMaxDescent() instead of dealing with the ascent.

i'm using Helvetica plain and Helvetica italic. Is this a bug in java or did apple silently change the fonts in an inconsistent way? i don't want to change all my code depending on whether i'm on the one or other system. will this get fixed?

thanks + best, -sciss-

GIF image

GIF image

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.