--- old/src/java.desktop/share/classes/sun/font/FontFamily.java 2017-01-27 11:30:56.838649787 +0300 +++ new/src/java.desktop/share/classes/sun/font/FontFamily.java 2017-01-27 11:30:56.714649784 +0300 @@ -27,6 +27,7 @@ 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; @@ -132,6 +133,16 @@ 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); }