You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sergey Dmitriev (JIRA)" <ji...@apache.org> on 2007/07/03 14:32:06 UTC

[jira] Commented: (HARMONY-3719) Graphics.getFontMetrics() throws HeadlessExcetion if headless

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

Sergey Dmitriev commented on HARMONY-3719:
------------------------------------------

As I can see r551077 with the given patch does work on getfontmetrics test:

] boy@moon ~
] ~/jre/bin/java -version
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 = r551077, (Jul  3 2007), Linux/ia32/gcc 3.3.3, release build
http://harmony.apache.org

] boy@moon ~
] ~/jre/bin/java -Djava.awt.headless=true getfontmetrics
font metrics: org.apache.harmony.awt.gl.font.FontMetricsImpl[font=java.awt.Font[family=Luxi Sans,name=Dialog,style=plain,size=12]ascent=8, descent=2, height=13]


> 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
>            Assignee: Alexey Petrenko
>         Attachments: H-3719.patch
>
>
> 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.