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 int
getDescent
(Object context) (package private) static Object
getFontMetrics
(Font font, Object context) (package private) static Object
(package private) static int
stringWidth
(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
-