在非 JetBrain Runtime 上的 JetBrains IDE 中启用字体连字

Enabling font ligatures in JetBrains IDEs on non JetBrain Runtime

我运行一些JB IDE(想法,PyCharm)有意不使用JB 运行时间,而是使用由系统并希望保持这种状态。

是否可以通过某种设置覆盖 JRE 检查(不切换到 JB-JRE),以便连字复选框再次可用?

请查看this issue中的评论:

That's by design - JetBrains Runtime has performance optimizations related to text layout, that OpenJDK/Oracle JDK don't contain. Without them using ligatures can lead to performance problems.

执行代码中的校验here:

myEnableLigaturesCheckbox.setEnabled(!readOnly && SystemInfo.isJetBrainsJvm);

其中 SystemInfo.isJetBrainsJvmdefined as:

public static final boolean isJetBrainsJvm = containsIgnoreCase(JAVA_VENDOR, "JetBrains");

因此,您要么需要修补 IntelliJ IDEA 代码以接受其他运行时供应商,要么修补 JDK 以报告 JetBrains 供应商。没有简单的方法来覆盖它。