Changeset 8099 in josm
- Timestamp:
- 2015-02-22T23:04:55+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r8073 r8099 447 447 448 448 /** 449 * Add more fallback fonts to the Java runtime, in order to get450 * support for more scripts. 451 * 452 * The font configuration in Java doesn't include some Indic scripts,449 * <p>Add more fallback fonts to the Java runtime, in order to get 450 * support for more scripts.</p> 451 * 452 * <p>The font configuration in Java doesn't include some Indic scripts, 453 453 * even though MS Windows ships with fonts that cover these unicode 454 * ranges. 455 * 456 * To fix this, the fontconfig.properties template is copied to the JOSM454 * ranges.</p> 455 * 456 * <p>To fix this, the fontconfig.properties template is copied to the JOSM 457 457 * cache folder. Then, the additional entries are added to the font 458 458 * configuration. Finally the system property "sun.awt.fontconfig" is set 459 * to the customized fontconfig.properties file. 460 * 461 * This is a crude hack, but better than no font display at all for these459 * to the customized fontconfig.properties file.</p> 460 * 461 * <p>This is a crude hack, but better than no font display at all for these 462 462 * languages. 463 463 * There is no guarantee, that the template file … … 465 465 * configuration (which is in a binary format). 466 466 * Furthermore, the system property "sun.awt.fontconfig" is undocumented and 467 * may no longer work in future versions of Java. 467 * may no longer work in future versions of Java.</p> 468 * 469 * <p>Related Java bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8008572">JDK-8008572</a></p> 468 470 * 469 471 * @param templateFileName file name of the fontconfig.properties template file -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r8015 r8099 320 320 fontsAvail.add(p.getFileName().toString().toUpperCase()); 321 321 } 322 fontsAvail.add(""); // for devanagari 322 323 } catch (IOException ex) { 324 Main.error(ex, false); 323 325 Main.warn("extended font config - failed to load available Fonts"); 324 326 fontsAvail = null; 325 327 } 326 fontsAvail.add(""); // for devanagari327 328 return fontsAvail; 328 329 } … … 333 334 def.add(new FontEntry("devanagari", "", "")); // just include in fallback list 334 335 // font already defined in template 335 // Win 8 (and later) 336 def.add(new FontEntry("myanmar", "Myanmar Text", "MMRTEXT.TTF")); // ISO 639: my 337 338 // Win 7 and later 339 def.add(new FontEntry("nko_tifinagh_vai_osmanya", "Ebrima", "EBRIMA.TTF")); // ISO 639: ber 340 def.add(new FontEntry("khmer1", "Khmer UI", "KHMERUI.TTF")); // ISO 639: km 341 def.add(new FontEntry("lao1", "Lao UI", "LAOUI.TTF")); // ISO 639: lo 342 343 // Win Vista and later: 336 337 // Windows scripts: https://msdn.microsoft.com/en-us/goglobal/bb688099.aspx 338 // IE default fonts: https://msdn.microsoft.com/en-us/library/ie/dn467844(v=vs.85).aspx 339 340 // Windows 8/8.1 and later 341 def.add(new FontEntry("javanese", "Javanese Text", "JAVATEXT.TTF")); // ISO 639: jv 342 def.add(new FontEntry("leelawadee", "Leelawadee", "LEELAWAD.TTF")); // ISO 639: bug 343 def.add(new FontEntry("myanmar", "Myanmar Text", "MMRTEXT.TTF")); // ISO 639: my 344 def.add(new FontEntry("nirmala", "Nirmala UI", "NIRMALA.TTF")); // ISO 639: sat,srb 345 def.add(new FontEntry("segoeui", "Segoe UI", "SEGOEUI.TTF")); // ISO 639: lis 346 347 // Windows 7 and later 348 def.add(new FontEntry("nko_tifinagh_vai_osmanya", "Ebrima", "EBRIMA.TTF")); // ISO 639: ber. Nko only since Win 8 349 def.add(new FontEntry("khmer1", "Khmer UI", "KHMERUI.TTF")); // ISO 639: km 350 def.add(new FontEntry("lao1", "Lao UI", "LAOUI.TTF")); // ISO 639: lo 351 def.add(new FontEntry("tai_le", "Microsoft Tai Le", "TAILE.TTF")); // ISO 639: khb 352 def.add(new FontEntry("new_tai_lue", "Microsoft New Tai Lue", "NTHAILU.TTF")); // ISO 639: khb 353 354 // Windows Vista and later: 344 355 def.add(new FontEntry("ethiopic", "Nyala", "NYALA.TTF")); // ISO 639: am,gez,ti 345 356 def.add(new FontEntry("tibetan", "Microsoft Himalaya", "HIMALAYA.TTF")); // ISO 639: bo,dz … … 352 363 def.add(new FontEntry("oriya", "Kalinga", "KALINGA.TTF")); // ISO 639: or 353 364 def.add(new FontEntry("sinhala", "Iskoola Pota", "ISKPOTA.TTF")); // ISO 639: si 354 355 // Win XP and later 365 def.add(new FontEntry("yi", "Yi Baiti", "MSYI.TTF")); // ISO 639: ii 366 367 // Windows XP and later 356 368 def.add(new FontEntry("gujarati", "Shruti", "SHRUTI.TTF")); 357 369 def.add(new FontEntry("kannada", "Tunga", "TUNGA.TTF")); 358 def.add(new FontEntry("gurmuhi", "Raavi", "RAAVI.TTF")); 359 def.add(new FontEntry("tamil", "Latha", "LATHA.TTF")); 370 def.add(new FontEntry("gurmukhi", "Raavi", "RAAVI.TTF")); 360 371 def.add(new FontEntry("telugu", "Gautami", "GAUTAMI.TTF")); 361 def.add(new FontEntry("bengali", "Vrinda", "VRINDA.TTF")); 372 def.add(new FontEntry("bengali", "Vrinda", "VRINDA.TTF")); // since XP SP2 362 373 def.add(new FontEntry("syriac", "Estrangelo Edessa", "ESTRE.TTF")); // ISO 639: arc 363 374 def.add(new FontEntry("thaana", "MV Boli", "MVBOLI.TTF")); // ISO 639: dv 364 375 def.add(new FontEntry("malayalam", "Kartika", "KARTIKA.TTF")); // ISO 639: ml; since XP SP2 365 376 377 // Windows 2000 and later 378 def.add(new FontEntry("tamil", "Latha", "LATHA.TTF")); 379 366 380 // Comes with MS Office & Outlook 2000. Good unicode coverage, so add if available. 367 381 def.add(new FontEntry("arialuni", "Arial Unicode MS", "ARIALUNI.TTF")); … … 369 383 return def; 370 384 } 371 372 385 }
Note:
See TracChangeset
for help on using the changeset viewer.