Basic HTML version of Foils prepared 13 July 98

Foil 9 FontMetrics Object

From Java Academy II:Intermediate Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo

The java.awt.FontMetrics Class
Given a Graphics object g, the metric properties of the current font are obtained as follows: FontMetrics fm = g.getFontMetrics(); int ascent = fm.getAscent(); int descent = fm.getDescent(); int leading = fm.getLeading(); int height = fm.getHeight();



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998