Revert "JBR-1775: improved logic for choosing newer font between system and bundled ones"

This reverts commit 5ef38ed8fa.
This commit is contained in:
Vitaly Provodin
2023-07-03 05:41:49 +07:00
parent 845dc9612f
commit 1965ab0496
8 changed files with 261 additions and 302 deletions

View File

@@ -25,7 +25,9 @@
package sun.awt;
import sun.font.*;
import sun.font.FcFontConfiguration;
import sun.font.FontConfigManager;
import sun.font.SunFontManager;
/**
* A {@link sun.font.FontManager} that uses fontconfig to find system fonts.
@@ -43,13 +45,6 @@ public class FcFontManager extends SunFontManager {
return fcManager;
}
@Override
protected String getSystemFontVersion(TrueTypeFont bundledFont) {
String query = bundledFont.getTypographicFamilyName() + ":style=" + bundledFont.getTypographicSubfamilyName();
String systemFont = FontConfigManager.getFontProperty(query, "%{file}");
return systemFont != null ? getTrueTypeVersion(systemFont) : "0";
}
@Override
protected FontConfiguration createFontConfiguration() {
FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);