Overview | Methods | Fields | This Package | All Packages
OverviewMethodsFieldsThis PackageAll Packages
Font.getSize
Retrieves the size of the font in the units with which the font was created.
Syntax
public final float getSize()
public float getSize( int units )
public float getSize( Graphics gr**, int** units )
Parameters
units
The units in which the font's size should be measured. This value must be one of the enumeration constants defined in the FontSize class.
gr
A Graphics object used to convert the font's size to the specified units.
Return Value
Returns the font size.
Remarks
Windows defines a font's positive size as its cell height, which is usually the distance from the bottom of a g to the top of an M.
You define the units in which a font's size is measured when you construct the font. If you create a Font object using a constructor that takes no units, a default value of FontSize.POINTS is used.
If your call to getSize does not specify the units in which you want the font size returned, the units specified when the Font object was created are returned.