/[classpath]/classpath/gnu/java/awt/peer/ClasspathFontPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/ClasspathFontPeer.java

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

revision 1.4 by mkoch, Thu Apr 22 07:22:52 2004 UTC revision 1.4.2.1 by gnu_andrew, Sat Jan 15 17:01:40 2005 UTC
# Line 160  public abstract class ClasspathFontPeer Line 160  public abstract class ClasspathFontPeer
160      return name;      return name;
161    }    }
162    
163    protected static void copyStyleToAttrs (int style, Map attrs)    public static void copyStyleToAttrs (int style, Map attrs)
164    {    {
165      if ((style & Font.BOLD) == Font.BOLD)      if ((style & Font.BOLD) == Font.BOLD)
166        attrs.put (TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);        attrs.put (TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);
# Line 179  public abstract class ClasspathFontPeer Line 179  public abstract class ClasspathFontPeer
179        attrs.put (TextAttribute.FAMILY, fam);        attrs.put (TextAttribute.FAMILY, fam);
180    }    }
181        
182    protected static void copySizeToAttrs (float size, Map attrs)    public static void copySizeToAttrs (float size, Map attrs)
183    {    {
184      attrs.put (TextAttribute.SIZE, new Float (size));      attrs.put (TextAttribute.SIZE, new Float (size));
185    }    }
# Line 218  public abstract class ClasspathFontPeer Line 218  public abstract class ClasspathFontPeer
218      AffineTransform trans = this.transform;      AffineTransform trans = this.transform;
219      float size = this.size;      float size = this.size;
220      int style = this.style;      int style = this.style;
221        
222      if (attribs.containsKey (TextAttribute.FAMILY))      if (attribs.containsKey (TextAttribute.FAMILY))
223        family = (String) attribs.get (TextAttribute.FAMILY);        family = (String) attribs.get (TextAttribute.FAMILY);
224    
# Line 243  public abstract class ClasspathFontPeer Line 243  public abstract class ClasspathFontPeer
243        {        {
244          Float sz = (Float) attribs.get (TextAttribute.SIZE);          Float sz = (Float) attribs.get (TextAttribute.SIZE);
245          size = sz.floatValue ();          size = sz.floatValue ();
246    
247            // Pango doesn't accept 0 as a font size.
248            if (size < 1)
249              size = 1;
250        }        }
251        else
252          size = 12;
253    
254      if (attribs.containsKey (TextAttribute.TRANSFORM))      if (attribs.containsKey (TextAttribute.TRANSFORM))
255        {        {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

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