We are trying to render a font with a specific number of pixels.  So, we
have a small loop that tries different point sizes of a given font until
it finds one that matches the number of pixels required.  When using
getHeight(), it tells us the number of pixels it will draw the current
font at with the given Graphics object.  However, when we then draw with
that font, it is not taking up that number of pixels.  On 80% of our
fonts, the height reported is actually larger than the actual drawing.
(I checked the leading, and it was 0 in all cases) It actually works for
about 20% of our fonts.  We verify this by drawing a rectangle at the
same number of pixels.  The font should hit the top and bottom line.  We
have actually gotten a little better results with using getAscent()
instead of getHeight(), which doesn't make any sense to me.  Is the true
type information wrong in the file?  Does java have a problem with
this?   Is there any other way to know what height a certain font will
be rendered at?

Irv

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to