/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkFontPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkFontPeer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mark, Fri Nov 8 00:36:35 2002 UTC revision 1.6 by tromey, Wed Feb 19 03:50:33 2003 UTC
# Line 57  public class GtkFontPeer implements Font Line 57  public class GtkFontPeer implements Font
57        }        }
58    }    }
59    
60    final private String Xname;    final private String Xname; // uses %d for font size.
61    
62    public GtkFontPeer (String name, int style)    public GtkFontPeer (String name, int style)
63    {    {
64      if (bundle != null)      if (bundle != null)
65        Xname = bundle.getString (name.toLowerCase () + "." + style);        Xname = bundle.getString (name.toLowerCase () + "." + style);
66      else      else
67        Xname = "-*-*-medium-r-normal-*-12-*-*-*-c-*-*-*";        {
68            String weight;
69            String slant;
70            String spacing;
71    
72            if (style == Font.ITALIC || (style == (Font.BOLD+Font.ITALIC)))
73              slant = "i";
74            else
75              slant = "r";
76            if (style == Font.BOLD || (style == (Font.BOLD+Font.ITALIC)))
77              weight = "bold";
78            else
79              weight = "medium";
80            if (name.equals("Serif") || name.equals("SansSerif")
81                || name.equals("Helvetica") || name.equals("Times"))
82              spacing = "p";
83            else
84              spacing = "c";
85    
86            Xname = "-*-*-" + weight + "-" + slant + "-normal-*-%d-*-*-*-" + spacing + "-*-*-*";
87          }
88    }    }
89    
90    public String getXLFD ()    public String getXLFD ()

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26