# Class Font

java.lang.Object
org.jmol.util.Font

public final class Font extends Object

Provides font support using a int fid (Font ID) as an index into font table.

Supports standard font faces, font styles, and font sizes.

Author:
  Miguel, miguel@jmol.org

## Field Summary

Fields
Modifier and Type
Field
Description
`final int`
`fid`
`final Object`
`font`
`static final int`
`FONT_FACE_MONO`
`static final int`
`FONT_FACE_SANS`
`static final int`
`FONT_FACE_SERIF`
`static final int`
`FONT_STYLE_BOLD`
`static final int`
`FONT_STYLE_BOLDITALIC`
`static final int`
`FONT_STYLE_ITALIC`
`static final int`
`FONT_STYLE_PLAIN`
`final String`
`fontFace`
`final float`
`fontSize`
`float`
`fontSizeAngstroms`
`final float`
`fontSizeNominal`
`final String`
`fontStyle`
`final int`
`idFontFace`
`final int`
`idFontStyle`

## Method Summary

Modifier and Type
Method
Description
`static Font`
`createFont3D(int fontface, int fontstyle, float fontsize, float fontsizeNominal, float fontSizeAngstroms, FontManager manager, Object graphicsForMetrics)`
`int`
`getAscent()`
`int`
`getDescent()`
`static Font`
`getFont3D(int fontID)`
`static int`
`getFontFaceID(String fontface)`
`Object`
`getFontMetrics()`
`static int`
`getFontStyleID(String fontstyle)`
`int`
`getHeight()`
`String`
`getInfo()`
`int`
`stringWidth(String text)`
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### fid

public final int fid

### fontFace

public final String fontFace

### fontStyle

public final String fontStyle

### fontSizeNominal

public final float fontSizeNominal

### idFontFace

public final int idFontFace

### idFontStyle

public final int idFontStyle

### fontSize

public final float fontSize

### font

public final Object font

### fontSizeAngstroms

public float fontSizeAngstroms

### FONT_FACE_SANS

public static final int FONT_FACE_SANS

See Also:
  - Constant Field Values

### FONT_FACE_SERIF

public static final int FONT_FACE_SERIF

See Also:
  - Constant Field Values

### FONT_FACE_MONO

public static final int FONT_FACE_MONO

See Also:
  - Constant Field Values

### FONT_STYLE_PLAIN

public static final int FONT_STYLE_PLAIN

See Also:
  - Constant Field Values

### FONT_STYLE_BOLD

public static final int FONT_STYLE_BOLD

See Also:
  - Constant Field Values

### FONT_STYLE_ITALIC

public static final int FONT_STYLE_ITALIC

See Also:
  - Constant Field Values

### FONT_STYLE_BOLDITALIC

public static final int FONT_STYLE_BOLDITALIC

See Also:
  - Constant Field Values

## Method Details

### getFont3D

public static Font getFont3D(int fontID)

### createFont3D

public static Font createFont3D(int fontface, int fontstyle, float fontsize, float fontsizeNominal, float fontSizeAngstroms, FontManager manager, Object graphicsForMetrics)

### getFontFaceID

public static int getFontFaceID(String fontface)

### getFontStyleID

public static int getFontStyleID(String fontstyle)

### getAscent

public int getAscent()

### getDescent

public int getDescent()

### getHeight

public int getHeight()

### getFontMetrics

public Object getFontMetrics()

### stringWidth

public int stringWidth(String text)

### getInfo

public String getInfo()

### toString

public String toString()

Overrides:
  `toString` in class `Object`