< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WFontConfiguration.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 164,176 **** } private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) { String fontName = null; for (int i = 0; i < fontDescriptors.length; i++) { ! String componentFontName = fontDescriptors[i].getNativeName(); ! if (componentFontName.endsWith(charset)) { fontName = componentFontName; } } return fontName; } --- 164,179 ---- } private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) { String fontName = null; for (int i = 0; i < fontDescriptors.length; i++) { ! FontDescriptor desc = fontDescriptors[i]; ! String componentFontName = desc.getNativeName(); ! if ((desc.isDefaultFont() && charset.equals("DEFAULT_CHARSET")) || ! componentFontName.endsWith(charset)) { fontName = componentFontName; + break; } } return fontName; }
< prev index next >