src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java

Print this page

        

*** 27,37 **** 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 */ --- 27,39 ---- 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 */
*** 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 (FontUtilities.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