Changeset 8641 in josm for trunk/src/org


Ignore:
Timestamp:
2015-08-05T14:04:18+02:00 (5 years ago)
Author:
bastiK
Message:

fixed #11750 - Broken UTF-8 support in startup screen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r8510 r8641  
    319319    /**
    320320     * Gets the font used to display JOSM title in about dialog and splash screen.
    321      * @return By order or priority, the first font available in local fonts:
    322      *         1. Helvetica Bold 20
    323      *         2. Calibri Bold 23
    324      *         3. Arial Bold 20
    325      *         4. SansSerif Bold 20
    326      *         Except if current language is Khmer, where it will be current font at size 20
    327321     * @since 5797
    328322     */
    329323    public static Font getTitleFont() {
    330         List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
    331         // Special font for Khmer script
    332         if ("km".equals(LanguageInfo.getJOSMLocaleCode())) {
    333             return UIManager.getFont("Label.font").deriveFont(20.0f);
    334         }
    335         // Helvetica is the preferred choice but is not available by default on Windows
    336         // (https://www.microsoft.com/typography/fonts/product.aspx?pid=161)
    337         if (fonts.contains("Helvetica")) {
    338             return new Font("Helvetica", Font.BOLD, 20);
    339         // Calibri is the default Windows font since Windows Vista but is not available on older versions of Windows, where Arial is preferred
    340         } else if (fonts.contains("Calibri")) {
    341             return new Font("Calibri", Font.BOLD, 23);
    342         } else if (fonts.contains("Arial")) {
    343             return new Font("Arial", Font.BOLD, 20);
    344         // No luck, nothing found, fallback to one of the 5 fonts provided with Java (Serif, SansSerif, Monospaced, Dialog, and DialogInput)
    345         } else {
    346             return new Font("SansSerif", Font.BOLD, 20);
    347         }
     324        return new Font("SansSerif", Font.BOLD, 23);
    348325    }
    349326
Note: See TracChangeset for help on using the changeset viewer.