harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Viskov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3719) Graphics.getFontMetrics() throws HeadlessExcetion if headless
Date Thu, 21 Jun 2007 12:06:29 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506862
] 

Nikolay Viskov commented on HARMONY-3719:
-----------------------------------------

It should work since FontLibrary contribution has been applied.
Please verify.

> Graphics.getFontMetrics() throws HeadlessExcetion if headless
> -------------------------------------------------------------
>
>                 Key: HARMONY-3719
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3719
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Linux
>            Reporter: Sergey Dmitriev
>
> java.awt.Graphics.getFontMetrics() throws HeadlessException in headless mode.
> ] bob@moon ~
> ] cat getfontmetrics.java
> import java.awt.*;
> import java.awt.image.*;
>  
> public class getfontmetrics {
>     public static void main(String args[]) throws Exception {
>         BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
>         Graphics g = image.getGraphics();
>         FontMetrics fm = g.getFontMetrics();
>         System.out.println("font metrics: " + fm);
>     }
> }
>  
> ] bob@moon ~
> ] java -showversion -Djava.awt.headless=true getfontmetrics                         
                                       
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-linux-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
>  
> font metrics: sun.font.FontDesignMetrics[font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]ascent=12,
descent=3, height=15]
>  
> ] bob@moon ~
> ] ~/jre/bin/java -showversion -Djava.awt.headless=true getfontmetrics               
                 
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r531171, (Apr 22 2007), Linux/ia32/gcc 3.3.3, release build
> http://incubator.apache.org/harmony
> Uncaught exception in main:
> java.awt.HeadlessException
>         at java.awt.HeadlessToolkit.getGraphicsFactory(Unknown Source)
>         at java.awt.ToolkitImpl.getFontMetrics(Unknown Source)
>         at org.apache.harmony.awt.gl.CommonGraphics2D.getFontMetrics(Unknown Source)
>         at java.awt.Graphics.getFontMetrics(Unknown Source)
>         at getfontmetrics.main(getfontmetrics.java)
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message