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

## controlP5
Class ControlFont

    java.lang.Object
      controlP5.ControlFont

    public class ControlFont

extends java.lang.Object

A ControlFont is a container for a PFont that can be used to customize the font of a label. (Designing the Font handling gave me a big headache, especially when it comes to calculating the dimensions of a font which are not available at all times but only at certain times. The current status I suppose is a good compromise and works for standard font handling cases. For any special cases it will be difficult to convince me to make any changes.)

Field Summary
`static boolean` | `DEBUG`
`static boolean` | `RENDER_2X` set the RENDER_2X variable to true to double render text, this makes the font look bolder especially in OpenGL mode.

Constructor Summary
`ControlFont(processing.core.PFont theFont)`
`ControlFont(processing.core.PFont theFont, int theFontSize)`
`ControlFont(processing.core.PFont theFont, int theFontSize, int theLineHeight)`

Method Summary
`void` | `draw(processing.core.PApplet theApplet, Label theLabel)`
`controlP5.ControlFont.FontLabel` | `get()`
`int` | `getHeight()`
`int` | `getWidth()`
`static int` | `getWidthFor(java.lang.String theText, Label theLabel, processing.core.PApplet theApplet)`

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

Field Detail

### DEBUG

    public static boolean DEBUG

### RENDER_2X

    public static boolean RENDER_2X

  set the RENDER_2X variable to true to double render text, this makes the font look bolder especially in OpenGL mode. use: ControlFont.RENDER_2X = true;

Constructor Detail

### ControlFont

    public ControlFont(processing.core.PFont theFont)

### ControlFont

    public ControlFont(processing.core.PFont theFont,
                       int theFontSize)

### ControlFont

    public ControlFont(processing.core.PFont theFont,
                       int theFontSize,
                       int theLineHeight)

Method Detail

### draw

    public void draw(processing.core.PApplet theApplet,
                     Label theLabel)

### get

    public controlP5.ControlFont.FontLabel get()

### getHeight

    public int getHeight()

### getWidth

    public int getWidth()

### getWidthFor

    public static int getWidthFor(java.lang.String theText,
                                  Label theLabel,
                                  processing.core.PApplet theApplet)

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

processing library controlP5 by Andreas Schlegel. (c) 2006-2012