JSFont
Date: 2019-10-22

org.jmol.awtjs2d

## Class JSFont

- java.lang.Object
- - org.jmol.awtjs2d.JSFont

-     class JSFont
      extends java.lang.Object

  methods required by Jmol that access java.awt.Font private to org.jmol.awtjs2d

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSFont()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static int` | `getAscent(java.lang.Object context)`
    `(package private) static int` | `getDescent(java.lang.Object context)`
    `(package private) static java.lang.Object` | `getFontMetrics(Font font, java.lang.Object context)`
    `(package private) static java.lang.Object` | `newFont(java.lang.String fontFace, boolean isBold, boolean isItalic, float fontSize, java.lang.String type)`
    `(package private) static int` | `stringWidth(Font font, java.lang.Object context, java.lang.String text)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### JSFont

          JSFont()

  - ### Method Detail

    - #### newFont

          static java.lang.Object newFont(java.lang.String fontFace,
                                          boolean isBold,
                                          boolean isItalic,
                                          float fontSize,
                                          java.lang.String type)

    - #### getFontMetrics

          static java.lang.Object getFontMetrics(Font font,
                                                 java.lang.Object context)

      Parameters:
        `font` -
        `context` -
      Returns:
        the context

    - #### getAscent

          static int getAscent(java.lang.Object context)

      Parameters:
        `context` -
      Returns:
        height of the font

    - #### getDescent

          static int getDescent(java.lang.Object context)

      Parameters:
        `context` -
      Returns:
        descent of "g"

    - #### stringWidth

          static int stringWidth(Font font,
                                 java.lang.Object context,
                                 java.lang.String text)

      Parameters:
        `font` -
        `context` -
        `text` -
      Returns:
        width