public class FontFactory extends Object
FontConstructor implementation.
Default FontConstructor is jogamp.graph.font.typecast.TypecastFontConstructor,
i.e. using our internal typecast branch.
| Modifier and Type | Field and Description |
|---|---|
static int |
JAVA
Java fonts are optional, 1
|
static int |
UBUNTU
Ubuntu is the default font family, 0
|
| Constructor and Description |
|---|
FontFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Font |
get(Class<?> context,
String fname,
boolean useTempJarCache) |
static Font |
get(File file)
Creates a Font instance.
|
static Font |
get(InputStream stream,
boolean closeStream)
Creates a Font instance based on an undeterminated font stream length.
|
static Font |
get(InputStream stream,
int streamLen,
boolean closeStream)
Creates a Font instance based on a determinated font stream with its given length
of the font segment.
|
static FontSet |
get(int font) |
static FontSet |
getDefault() |
static boolean |
isPrintableChar(char c) |
public static final int UBUNTU
public static final int JAVA
public static final FontSet getDefault()
public static final FontSet get(int font)
public static final Font get(File file) throws IOException
file - font fileIOExceptionpublic static final Font get(InputStream stream, int streamLen, boolean closeStream) throws IOException
No explicit stream copy is performed as in get(InputStream, boolean)
due to the known streamLen.
stream - font streamstreamLen - length of the font segment within this font streamcloseStream - true to close the streamIOExceptionpublic static final Font get(InputStream stream, boolean closeStream) throws IOException
The font stream is temporarily copied into a temp file to gather it's size and to gain random access. The temporary file will be deleted at exit.
stream - dedicated font streamcloseStream - true to close the streamIOExceptionpublic static final Font get(Class<?> context, String fname, boolean useTempJarCache) throws IOException
IOExceptionpublic static boolean isPrintableChar(char c)
Copyright 2010 JogAmp Community.