Java 类sun.awt.FontConfiguration 实例源码

项目:OpenJSharp    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:jdk8u-jdk    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:OpenJSharp    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:OpenJSharp    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:OpenJSharp    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

}
项目:jdk8u-jdk    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:jdk8u-jdk    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:jdk8u-jdk    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:openjdk-jdk10    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:openjdk-jdk10    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:openjdk-jdk10    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:openjdk-jdk10    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:openjdk9    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:openjdk9    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:openjdk9    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:openjdk9    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:jdk8u_jdk    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:jdk8u_jdk    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:jdk8u_jdk    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:jdk8u_jdk    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:lookaside_java-1.8.0-openjdk    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:infobip-open-jdk-8    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:infobip-open-jdk-8    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:infobip-open-jdk-8    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:infobip-open-jdk-8    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:jdk8u-dev-jdk    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:jdk8u-dev-jdk    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:jdk8u-dev-jdk    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:jdk8u-dev-jdk    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:jdk7-jdk    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:jdk7-jdk    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:jdk7-jdk    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:jdk7-jdk    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}
项目:openjdk-source-code-learn    文件:CompileFontConfig.java   
CompileFontConfig(String inFile, String outFile, boolean verbose) {
    try {
        FileInputStream in = new FileInputStream(inFile);
        FileOutputStream out = new FileOutputStream(outFile);
        FontConfiguration.verbose = verbose;
        FontConfiguration.loadProperties(in);
        FontConfiguration.saveBinary(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:openjdk-source-code-learn    文件:SunFontManager.java   
public synchronized void preferLocaleFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger().info("Entered preferLocaleFonts().");
    }
    /* Test if re-ordering will have any effect */
    if (!FontConfiguration.willReorderForStartupLocale()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gLocalePref == true) {
            return;
        }
        gLocalePref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(localeFontKey) == localeFontKey) {
            return;
        }
        appContext.put(localeFontKey, localeFontKey);
        boolean acPropPref =
            appContext.get(proportionalFontKey) == proportionalFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, true, acPropPref);
    }
}
项目:openjdk-source-code-learn    文件:SunFontManager.java   
public synchronized void preferProportionalFonts() {
    if (FontUtilities.isLogging()) {
        FontUtilities.getLogger()
            .info("Entered preferProportionalFonts().");
    }
    /* If no proportional fonts are configured, there's no need
     * to take any action.
     */
    if (!FontConfiguration.hasMonoToPropMap()) {
        return;
    }

    if (!maybeMultiAppContext()) {
        if (gPropPref == true) {
            return;
        }
        gPropPref = true;
        createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
        _usingAlternateComposites = true;
    } else {
        AppContext appContext = AppContext.getAppContext();
        if (appContext.get(proportionalFontKey) == proportionalFontKey) {
            return;
        }
        appContext.put(proportionalFontKey, proportionalFontKey);
        boolean acLocalePref =
            appContext.get(localeFontKey) == localeFontKey;
        ConcurrentHashMap<String, Font2D>
            altNameCache = new ConcurrentHashMap<String, Font2D> ();
        /* If there is an existing hashtable, we can drop it. */
        appContext.put(CompositeFont.class, altNameCache);
        _usingPerAppContextComposites = true;
        createCompositeFonts(altNameCache, acLocalePref, true);
    }
}
项目:openjdk-source-code-learn    文件:SunFontManager.java   
public void
    createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
                         boolean preferLocale,
                         boolean preferProportional) {

    FontConfiguration fontConfig =
        createFontConfiguration(preferLocale, preferProportional);
    initCompositeFonts(fontConfig, altNameCache);
}