My last source example was a bad example. Below is a simple example
that shows getting Arial-Bold from the system fonts array. On Java 5
Mac it will render Arial-Bold plain whereas everywhere else it
renders fine.
jeff
On Jan 3, 2006, at 5:15 PM, Jeff Martin wrote:
Bold fonts in my page layout application started failing under Java
5 on the mac. My app searches the system fonts for something like
Arial-Bold, but when I make a glyph vector out of it, it renders as
plain.
My theory is that the system fonts are being created with new Font
(name, Font.PLAIN) and that is confusing Java 5 on the Mac. My test
case below at least shows that Java 5 Mac behaves differently than
all other platforms/versions I've used, though I've always been
confused as to how the style flag conflicts with font names. On
Java 5 Mac, it draws the first Arial Bold text as plain - everyone
else draws it as bold. I don't know how to determine if the system
fonts from GraphicsEnvironment.getAllFonts is creating fonts with
Font.PLAIN.
Anyone else seen something similar? If not, I'll file a bug.
jeff
import java.awt.*;
import java.awt.font.*;
public class Test {
public static void main(String args[])
{
// Create frame
javax.swing.JFrame frame = new javax.swing.JFrame();
frame.setSize(300, 300);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden