Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jgame
Class JGFont

    java.lang.Object
      jgame.JGFont

    public class JGFont

extends java.lang.Object

A generic font specification for fonts on the different platforms. It is based on the JRE platform, other platforms should do their best to translate it to something equivalent or use sensible defaults if there is nothing comparable.

Field Summary
`static int` | `BOLD`
`java.lang.Object` | `impl` Optional object that represents the font on a particular platform.
`static int` | `ITALIC`
`java.lang.String` | `name` The font name can be a logical font name or a font face name.
`static int` | `PLAIN`
`double` | `size` Font size is effectively pixel height.
`int` | `style` The style is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC).

Constructor Summary
`JGFont(java.lang.String name, int style, double size)` Creates a new Font from the specified name, style and point size.

Method Summary
`int` | `getSize()`
`double` | `getSize2D()`
`int` | `getStyle()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PLAIN

    public static final int PLAIN

See Also:
  Constant Field Values

### BOLD

    public static final int BOLD

See Also:
  Constant Field Values

### ITALIC

    public static final int ITALIC

See Also:
  Constant Field Values

### name

    public java.lang.String name

  The font name can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, or SansSerif. If name is null, the name of the new Font is set to the name "Default".

### style

    public int style

  The style is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.

### size

    public double size

  Font size is effectively pixel height.

### impl

    public java.lang.Object impl

  Optional object that represents the font on a particular platform.

Constructor Detail

### JGFont

    public JGFont(java.lang.String name,
                  int style,
                  double size)

  Creates a new Font from the specified name, style and point size. This is a generic font specification for fonts on the different platforms.

  Parameters:
    `name` - the font name
    `style` - - the style constant for the Font
    `size` - - the point size of the Font

Method Detail

### getSize

    public int getSize()

### getSize2D

    public double getSize2D()

### getStyle

    public int getStyle()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD