Using bitmap fonts in Netbeans
Is it possible to use bitmap (.fon) fonts in Netbeans? I have a font I particularly like (开发者_开发问答Raize font) and I don't see it anywhere on the list when I try to set it as the editor font. I can use it in other editors (Notepad++, pspad, visual c++ express etc). I can't use it in jedit either. Is this issue java related?
According the Java API Specification for the java.awt.font
package, which is used to add font support to Java, mentions that the following types of fonts are supported:
- Type 1 fonts
- Type 1 Multiple Master fonts
- OpenType fonts
- TrueType fonts
It appears that Microsoft bitmap fonts (.fon
) are not supported, at least from the information I was able to find.
On a related note, to get a listing of all the Font
s which are installed in Java at the current time, one can make a call to GraphicsEnvironment.getAllFonts
which will return a Font[]
of all the fonts which can be used.
(Note that the GraphicsEnvironment
class cannot be instantiated, but an instance can be obtained by the GraphicsEnvironment.getLocalGraphicsEnvironment
method.)
精彩评论