提交 01423d3c 编写于 作者: D dbatrak

8170950: Text is displayed in bold when fonts are installed into symlinked folder

Reviewed-by: prr, serb
上级 f6adbf3a
......@@ -27,6 +27,7 @@ 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;
......@@ -132,6 +133,16 @@ public class FontFamily {
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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册