src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java
Print this page
rev 1297 : [mq]: fontmanager.patch
*** 27,38 ****
import java.awt.*;
import java.awt.geom.AffineTransform;
import javax.swing.plaf.FontUIResource;
import java.util.StringTokenizer;
- import sun.font.FontManager;
/**
* @author Shannon Hickey
* @author Leif Samuelsson
*/
class PangoFonts {
--- 27,40 ----
import java.awt.*;
import java.awt.geom.AffineTransform;
import javax.swing.plaf.FontUIResource;
import java.util.StringTokenizer;
+ import sun.font.FontConfigManager;
+ import sun.font.FontUtilities;
+
/**
* @author Shannon Hickey
* @author Leif Samuelsson
*/
class PangoFonts {
*** 191,207 ****
if (size < 1) {
size = 1;
}
String fcFamilyLC = family.toLowerCase();
! if (FontManager.mapFcName(fcFamilyLC) != null) {
/* family is a Fc/Pango logical font which we need to expand. */
! return FontManager.getFontConfigFUIR(fcFamilyLC, style, size);
} else {
/* It's a physical font which we will create with a fallback */
Font font = new FontUIResource(family, style, size);
! return FontManager.getCompositeFontUIResource(font);
}
}
/**
* Parses a String containing a pango font description and returns
--- 193,209 ----
if (size < 1) {
size = 1;
}
String fcFamilyLC = family.toLowerCase();
! if (FontConfigManager.mapFcName(fcFamilyLC) != null) {
/* family is a Fc/Pango logical font which we need to expand. */
! return FontUtilities.getFontConfigFUIR(fcFamilyLC, style, size);
} else {
/* It's a physical font which we will create with a fallback */
Font font = new FontUIResource(family, style, size);
! return FontUtilities.getCompositeFontUIResource(font);
}
}
/**
* Parses a String containing a pango font description and returns