Package com.jogamp.graph.font
Class FontFactory
java.lang.Object
com.jogamp.graph.font.FontFactory
The optional property jogamp.graph.font.ctor
allows user to specify the
FontConstructor
implementation.
Default FontConstructor
is TypecastFontConstructor
,
i.e. using our internal typecast branch.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final FontSet
get
(int font) static final Font
Creates a Font instance.static final Font
get
(InputStream stream, boolean closeStream) Creates a Font instance based on an undeterminated font stream length.static final 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 final Font
static final FontSet
static boolean
isPrintableChar
(char c)
-
Field Details
-
UBUNTU
public static final int UBUNTUUbuntu is the default font family, 0- See Also:
-
JAVA
public static final int JAVAJava fonts are optional, 1- See Also:
-
-
Constructor Details
-
FontFactory
public FontFactory()
-
-
Method Details
-
getDefault
-
get
-
get
Creates a Font instance.- Parameters:
file
- font file- Returns:
- the new Font instance
- Throws:
IOException
-
get
public static final Font get(InputStream stream, int streamLen, boolean closeStream) throws IOException Creates a Font instance based on a determinated font stream with its given length of the font segment.No explicit stream copy is performed as in
get(InputStream, boolean)
due to the knownstreamLen
.- Parameters:
stream
- font streamstreamLen
- length of the font segment within this font streamcloseStream
-true
to close thestream
- Returns:
- the new Font instance
- Throws:
IOException
-
get
Creates a Font instance based on an undeterminated font stream length.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.
- Parameters:
stream
- dedicated font streamcloseStream
-true
to close thestream
- Returns:
- the new Font instance
- Throws:
IOException
-
get
public static final Font get(Class<?> context, String fname, boolean useTempJarCache) throws IOException - Throws:
IOException
-
isPrintableChar
public static boolean isPrintableChar(char c)
-