https://issues.apache.org/bugzilla/show_bug.cgi?id=54904

--- Comment #4 from [email protected] ---
To test your JRE use this bit of code. It prints the font name and a number. If
the number is 0.0 than autosize won't work for that font.


final java.awt.GraphicsEnvironment gEnv =
    java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();
final String envfonts[] = gEnv.getAvailableFontFamilyNames();
for(String font : envfonts) {
    final String txt = "Test";
    final java.text.AttributedString str = new java.text.AttributedString(txt);
    str.addAttribute(java.awt.font.TextAttribute.FAMILY, font, 0,
txt.length());
    str.addAttribute(java.awt.font.TextAttribute.SIZE, (float) 14.0);
    str.addAttribute(java.awt.font.TextAttribute.WEIGHT,
java.awt.font.TextAttribute.WEIGHT_BOLD, 0, txt.length());
    final java.awt.font.FontRenderContext fontRenderContext = new
java.awt.font.FontRenderContext(null, true, true);
    final java.awt.font.TextLayout layout = new
java.awt.font.TextLayout(str.getIterator(), fontRenderContext);
    System.out.println(font + " : " + layout.getBounds().getWidth());
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to