提交 006d992d 编写于 作者: R rkennke

6870238: Font2DTest fails on Debian after FontManager refactoring

Summary: Use fontManager field instead of querying the FontManagerFactory
Reviewed-by: igor, prr
上级 84c7e7ae
...@@ -90,7 +90,7 @@ public class FcFontConfiguration extends FontConfiguration { ...@@ -90,7 +90,7 @@ public class FcFontConfiguration extends FontConfiguration {
setFontConfiguration(); setFontConfiguration();
readFcInfo(); readFcInfo();
X11FontManager fm = X11FontManager.getInstance(); X11FontManager fm = (X11FontManager) fontManager;
FontConfigManager fcm = fm.getFontConfigManager(); FontConfigManager fcm = fm.getFontConfigManager();
if (fcCompFonts == null) { if (fcCompFonts == null) {
fcCompFonts = fcm.loadFontConfig(); fcCompFonts = fcm.loadFontConfig();
...@@ -187,7 +187,7 @@ public class FcFontConfiguration extends FontConfiguration { ...@@ -187,7 +187,7 @@ public class FcFontConfiguration extends FontConfiguration {
@Override @Override
public String[] getPlatformFontNames() { public String[] getPlatformFontNames() {
HashSet<String> nameSet = new HashSet<String>(); HashSet<String> nameSet = new HashSet<String>();
X11FontManager fm = X11FontManager.getInstance(); X11FontManager fm = (X11FontManager) fontManager;
FontConfigManager fcm = fm.getFontConfigManager(); FontConfigManager fcm = fm.getFontConfigManager();
FcCompFont[] fcCompFonts = fcm.loadFontConfig(); FcCompFont[] fcCompFonts = fcm.loadFontConfig();
for (int i=0; i<fcCompFonts.length; i++) { for (int i=0; i<fcCompFonts.length; i++) {
...@@ -228,7 +228,7 @@ public class FcFontConfiguration extends FontConfiguration { ...@@ -228,7 +228,7 @@ public class FcFontConfiguration extends FontConfiguration {
@Override @Override
public CompositeFontDescriptor[] get2DCompositeFontInfo() { public CompositeFontDescriptor[] get2DCompositeFontInfo() {
X11FontManager fm = X11FontManager.getInstance(); X11FontManager fm = (X11FontManager) fontManager;
FontConfigManager fcm = fm.getFontConfigManager(); FontConfigManager fcm = fm.getFontConfigManager();
FcCompFont[] fcCompFonts = fcm.loadFontConfig(); FcCompFont[] fcCompFonts = fcm.loadFontConfig();
...@@ -363,7 +363,7 @@ public class FcFontConfiguration extends FontConfiguration { ...@@ -363,7 +363,7 @@ public class FcFontConfiguration extends FontConfiguration {
private void writeFcInfo() { private void writeFcInfo() {
Properties props = new Properties(); Properties props = new Properties();
props.setProperty("version", fileVersion); props.setProperty("version", fileVersion);
X11FontManager fm = X11FontManager.getInstance(); X11FontManager fm = (X11FontManager) fontManager;
FontConfigManager fcm = fm.getFontConfigManager(); FontConfigManager fcm = fm.getFontConfigManager();
FontConfigInfo fcInfo = fcm.getFontConfigInfo(); FontConfigInfo fcInfo = fcm.getFontConfigInfo();
props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion)); props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion));
...@@ -424,7 +424,7 @@ public class FcFontConfiguration extends FontConfiguration { ...@@ -424,7 +424,7 @@ public class FcFontConfiguration extends FontConfiguration {
return; return;
} }
Properties props = new Properties(); Properties props = new Properties();
X11FontManager fm = X11FontManager.getInstance(); X11FontManager fm = (X11FontManager) fontManager;
FontConfigManager fcm = fm.getFontConfigManager(); FontConfigManager fcm = fm.getFontConfigManager();
try { try {
FileInputStream fis = new FileInputStream(fcFile); FileInputStream fis = new FileInputStream(fcFile);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册