Changeset 8641 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2015-08-05T14:04:18+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r8510 r8641 319 319 /** 320 320 * 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 20323 * 2. Calibri Bold 23324 * 3. Arial Bold 20325 * 4. SansSerif Bold 20326 * Except if current language is Khmer, where it will be current font at size 20327 321 * @since 5797 328 322 */ 329 323 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); 348 325 } 349 326
Note:
See TracChangeset
for help on using the changeset viewer.