The Font class provides a method of specifying and using fonts. The Font class constructor constructs font objects using the font's name, style (PLAIN, BOLD, ITALIC, or BOLD + ITALIC), and point size. Java's fonts are named in a platform independent manner and then mapped to local fonts that are supported by the operating system on which it executes. The getName() method returns the logical Java font name of a particular font and the getFamily() method returns the operating system-specific name of the font. The standard Java font names are Courier, Helvetica, TimesRoman etc.

The font can be set for a graphics context and for a component.

Font getFont() It is a method of Graphics class used to get the font property

setFont(Font f) is used to set a font in the graphics context

There are following logical font names which are standard on all platforms and are mapped to actual fonts on a particular platform: