src/share/classes/javax/swing/text/StyleContext.java
Print this page
rev 1297 : [mq]: fontmanager.patch
*** 33,43 ****
import javax.swing.event.EventListenerList;
import javax.swing.event.ChangeEvent;
import java.lang.ref.WeakReference;
import java.util.WeakHashMap;
! import sun.font.FontManager;
/**
* A pool of styles and their associated resources. This class determines
* the lifetime of a group of resources by being a container that holds
* caches for various resources such as font and color that get reused
--- 33,43 ----
import javax.swing.event.EventListenerList;
import javax.swing.event.ChangeEvent;
import java.lang.ref.WeakReference;
import java.util.WeakHashMap;
! import sun.font.FontUtilities;
/**
* A pool of styles and their associated resources. This class determines
* the lifetime of a group of resources by being a container that holds
* caches for various resources such as font and color that get reused
*** 261,272 ****
}
}
if (f == null) {
f = new Font(family, style, size);
}
! if (! FontManager.fontSupportsDefaultEncoding(f)) {
! f = FontManager.getCompositeFontUIResource(f);
}
FontKey key = new FontKey(family, style, size);
fontTable.put(key, f);
}
return f;
--- 261,272 ----
}
}
if (f == null) {
f = new Font(family, style, size);
}
! if (! FontUtilities.fontSupportsDefaultEncoding(f)) {
! f = FontUtilities.getCompositeFontUIResource(f);
}
FontKey key = new FontKey(family, style, size);
fontTable.put(key, f);
}
return f;