jdk/src/share/classes/javax/swing/text/StyleContext.java
changeset 3928 be186a33df9b
parent 1639 a97859015238
child 5506 202f599c92aa
equal deleted inserted replaced
3927:d717df90e151 3928:be186a33df9b
    33 import javax.swing.event.EventListenerList;
    33 import javax.swing.event.EventListenerList;
    34 import javax.swing.event.ChangeEvent;
    34 import javax.swing.event.ChangeEvent;
    35 import java.lang.ref.WeakReference;
    35 import java.lang.ref.WeakReference;
    36 import java.util.WeakHashMap;
    36 import java.util.WeakHashMap;
    37 
    37 
    38 import sun.font.FontManager;
    38 import sun.font.FontUtilities;
    39 
    39 
    40 /**
    40 /**
    41  * A pool of styles and their associated resources.  This class determines
    41  * A pool of styles and their associated resources.  This class determines
    42  * the lifetime of a group of resources by being a container that holds
    42  * the lifetime of a group of resources by being a container that holds
    43  * caches for various resources such as font and color that get reused
    43  * caches for various resources such as font and color that get reused
   261                 }
   261                 }
   262             }
   262             }
   263             if (f == null) {
   263             if (f == null) {
   264                 f = new Font(family, style, size);
   264                 f = new Font(family, style, size);
   265             }
   265             }
   266             if (! FontManager.fontSupportsDefaultEncoding(f)) {
   266             if (! FontUtilities.fontSupportsDefaultEncoding(f)) {
   267                 f = FontManager.getCompositeFontUIResource(f);
   267                 f = FontUtilities.getCompositeFontUIResource(f);
   268             }
   268             }
   269             FontKey key = new FontKey(family, style, size);
   269             FontKey key = new FontKey(family, style, size);
   270             fontTable.put(key, f);
   270             fontTable.put(key, f);
   271         }
   271         }
   272         return f;
   272         return f;