Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.006 Beiträge
 
Delphi 2009 Professional
 
#3

AW: Probleme mit Koreanisch in einer Anwendung (Java/Swing)

  Alt 11. Mär 2019, 20:50
Malgun Gothic unterstützt Koreanische Schriftzeichen, Segoe UI aber nicht, laut Microsoft:

Zitat:
Segoe UI includes Latin, Greek, Cyrillic, and Arabic characters. There are new fonts, also optimized for ClearType, created for other character sets and uses. These include Meiryo for Japanese, Malgun Gothic for Korean, Microsoft JhengHei for Chinese (Traditional), Microsoft YaHei for Chinese (Simplified), Gisha for Hebrew, and Leelawadee for Thai, and the ClearType Collection fonts designed for document use.
Gefunden unter https://stackoverflow.com/questions/...sian-languages

Welche installierten Schriften einen String darstellen können, kann man in Java mit diesem Code ermitteln:

Code:
        String[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().
                getAvailableFontFamilyNames();
        System.out.println(fonts.length + " font families installed");
        List<String> supportedFonts = new ArrayList<>();
        for (String fontName : fonts) {
            Font f = new Font(fontName, Font.PLAIN, 1);
            if (f.canDisplayUpTo(MY_STRING)<0) {
                System.out.println(fontName);
                supportedFonts.add(fontName);
            }
        }
       
        String[] a = supportedFonts.toArray(new String[0]);
Michael Justin
habarisoft.com
  Mit Zitat antworten Zitat