C
Click
Hi all,
I have a little problem with fonts. In my program, I need to create fonts.
So I use the constructor of the Font object, by doing this:
Font f=new Font(fontName, fontStyle, fontHeight);
But when I change the font name to anything present on my machine (like
"Elephant"), the font created is always the basic system one. If I change
the name to the name of a logical font like "Monospaced", then the correct
font is found.
If I do a getAllFont in the current GraphicEnvironment, I get the correct
list of all the fonts.
Would you know how I can create the font that I want?
Thanks in advance, Francois
I have a little problem with fonts. In my program, I need to create fonts.
So I use the constructor of the Font object, by doing this:
Font f=new Font(fontName, fontStyle, fontHeight);
But when I change the font name to anything present on my machine (like
"Elephant"), the font created is always the basic system one. If I change
the name to the name of a logical font like "Monospaced", then the correct
font is found.
If I do a getAllFont in the current GraphicEnvironment, I get the correct
list of all the fonts.
Would you know how I can create the font that I want?
Thanks in advance, Francois