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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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

    Constructors
    Constructor and Description
    `ControlFont(processing.core.PFont theFont)`
    `ControlFont(processing.core.PFont theFont, int theFontSize)`
    `ControlFont(processing.core.PFont theFont, int theFontSize, int theLineHeight)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `adjust(processing.core.PGraphics theGraphics, Label theLabel)`
    `void` | `draw(ControlP5 c, Label theLabel)`
    `void` | `draw(processing.core.PGraphics theGraphics, Label theLabel)`
    `int` | `getBaseline()`
    `int` | `getBottom()`
    `int` | `getCenter()`
    `processing.core.PFont` | `getFont()`
    `int` | `getHeight()`
    `int` | `getOffset(int theIndex)`
    `int` | `getOverflow()`
    `int` | `getSize()`
    `int` | `getTextHeight()`
    `int` | `getTop()`
    `int` | `getWidth()`
    `static int` | `getWidthFor(java.lang.String theText, Label theLabel, processing.core.PGraphics theGraphics)`
    `void` | `init(Label theLabel)`
    `static void` | `normal()` sets the rendering of a PFont back to normal and single rendering.
    `void` | `setSize(int theSize)`
    `static void` | `sharp()` renders a PFont twice for better and sharper readability

    - ### 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

    - #### adjust

          public void adjust(processing.core.PGraphics theGraphics,
                             Label theLabel)

    - #### draw

          public void draw(ControlP5 c,
                           Label theLabel)

    - #### draw

          public void draw(processing.core.PGraphics theGraphics,
                           Label theLabel)

    - #### getBaseline

          public int getBaseline()

    - #### getBottom

          public int getBottom()

    - #### getCenter

          public int getCenter()

    - #### getFont

          public processing.core.PFont getFont()

    - #### getHeight

          public int getHeight()

    - #### getOffset

          public int getOffset(int theIndex)

    - #### getOverflow

          public int getOverflow()

    - #### getSize

          public int getSize()

    - #### getTextHeight

          public int getTextHeight()

    - #### getTop

          public int getTop()

    - #### getWidth

          public int getWidth()

    - #### getWidthFor

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

    - #### init

          public void init(Label theLabel)

    - #### normal

          public static void normal()

      sets the rendering of a PFont back to normal and single rendering.

    - #### setSize

          public void setSize(int theSize)

    - #### sharp

          public static void sharp()

      renders a PFont twice for better and sharper readability

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