Package org.jmol.awtjs2d
Class JSFont
java.lang.Object
org.jmol.awtjs2d.JSFont
methods required by Jmol that access java.awt.Font
private to org.jmol.awtjs2d
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static int(package private) static intgetDescent(Object context) (package private) static ObjectgetFontMetrics(Font font, Object context) (package private) static Object(package private) static intstringWidth(Font font, Object context, String text)
-
Constructor Details
-
JSFont
JSFont()
-
-
Method Details
-
newFont
-
getFontMetrics
- Parameters:
font-context-- Returns:
- the context
-
getAscent
- Parameters:
context-- Returns:
- height of the font
-
getDescent
- Parameters:
context-- Returns:
- descent of "g"
-
stringWidth
- Parameters:
font-context-text-- Returns:
- width
-