org.lobobrowser.util.gui
Class FontFactory
java.lang.Object
org.lobobrowser.util.gui.FontFactory
public class FontFactory
extends java.lang.Object
getFont
public Font getFont(String fontFamily,
String fontStyle,
String fontVariant,
String fontWeight,
float fontSize)
getInstance
public static final FontFactory getInstance()
registerFont
public void registerFont(String fontName,
int fontFormat,
java.io.InputStream fontStream)
throws java.awt.FontFormatException,
java.io.IOException
Registers a font family. It does not close the stream provided.
Fonts should be registered before the renderer has a chance to
cache document font specifications.
fontName
- The name of a font as it would appear in a font-family specification.fontFormat
- Should be Font.TRUETYPE_FONT
.
unregisterFont
public void unregisterFont(String fontName)
fontName
- The font name to be removed.