< prev index next >

src/java.desktop/share/classes/sun/font/FontFamily.java

Print this page

        

*** 25,34 **** --- 25,35 ---- package sun.font; import java.io.File; import java.awt.Font; + import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; import java.util.Locale;
*** 130,139 **** --- 131,150 ---- } File existDir = (new File(existingFont.platName)).getParentFile(); FileFont newFont = (FileFont)font; File newDir = (new File(newFont.platName)).getParentFile(); + if (existDir != null) { + try { + existDir = existDir.getCanonicalFile(); + } catch (IOException ignored) {} + } + if (newDir != null) { + try { + newDir = newDir.getCanonicalFile(); + } catch (IOException ignored) {} + } return java.util.Objects.equals(newDir, existDir); } /* * We want a family to be of the same width and prefer medium/normal width.
< prev index next >