Browse Source

REPORT-99485 修改字体为平台相关

newui
vito 12 months ago
parent
commit
383d52bc30
  1. 13
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  2. 15
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

13
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -36,7 +36,6 @@ import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.Desktop;
import java.awt.Font;
import java.io.BufferedReader;
@ -51,7 +50,6 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.Callable;
@ -307,17 +305,6 @@ public class DesignUtils {
*/
public static void initLookAndFeel() {
FineLightLaf.setup();
//获取当前系统语言下设计器用的默认字体
FRFont guiFRFont = getDefaultGUIFont();
//指定UIManager中字体
Enumeration keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement().toString();
if (key.endsWith(".font")) {
UIManager.put(key, isTextField(key) ? getNamedFont("Dialog") : guiFRFont);
}
}
FlatUIDefaultsInspector.install( "ctrl shift alt Y" );
}

15
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -32,14 +32,17 @@
# font weights
# Windows
[win]light.font = "Microsoft YaHei", "Microsoft JhengHei", "MingLiU", "Arial"
[win]semibold.font = "Microsoft YaHei", "Microsoft JhengHei", "MingLiU", "Arial"
[win]defaultFont = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial
[win]light.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, "Arial
[win]semibold.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial
# macOS
[mac]light.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", "Arial"
[mac]semibold.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", "Arial"
[mac]defaultFont = 12 "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
[mac]light.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
[mac]semibold.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
# Linux
[linux]light.font = "Noto SansCJK", "SimHei", "Arial", "Ubuntu"
[linux]semibold.font = "Noto SansCJK", "SimHei", "Arial", "Ubuntu"
[linux]defaultFont = 12 "Noto SansCJK", SimHei, Arial, Ubuntu
[linux]light.font = "Noto SansCJK", SimHei, Arial, Ubuntu
[linux]semibold.font = "Noto SansCJK", SimHei, Arial, Ubuntu
#---- variables ----
Component.defaultHeight=24

Loading…
Cancel
Save