Blurry preview when using JavaFX
When the characters in the preview look blurry, while the editor shows sharp characters.
When the preview of the AsciiDoc Plugin (usually on the right) is blurry: While the characters in the editor on the left look sharp, the characters in the preview on the right look blurry.
The following JetBrains ticket contains examples: IDEA-213110
This only happens when using the JavaFX preview. The current combinations seems to be:
Operating System Windows 10,
a high-resolution display with a fractional scaling (for example 125% or 175%),
IntelliJ running on OpenJDK 8 / JetBrains Runtime 8
Operating System Linux (for example Fedora 31 Wayland),
a high-resolution display with scaling-factor 200% or more,
IntelliJ running on OpenJDK or JetBrains Runtime (any version)
How do I fix this?
There are four alternatives to fix this:
If on IntelliJ 2020.2+: Change to JCEF preview
If running on Linux users or running JDK 8: Configure option sun.java2d.uiScale.enabled
For Windows users: Reinstall IDE with JetBrains Runtime 11
To change Runtime of existing IDE: Install the ‘Choose Runtime’ plugin
Change to JCEF preview
This JCEF preview embeds a Chromium based browser in the IDE. As it supports high-resolution displays and is the preview technology recommended by JetBrains, follow the instructions in the chapter ‘JCEF Preview’ to activate it.
Configure option sun.java2d.uiScale.enabled
Apply the following steps:
Go to Menu entry
Remove any previous set option containing
Add the following line to the options:
Restart the IDE
Upgrade to JetBrains Runtime 11 for running the IDE
Use one of the following options:
Download IntelliJ (or PyCharm, WebStorm, etc.) with JetBrains Runtime 11 (JBR11). This is available from release 2019.1, and will be the default starting from 2019.2.
When downloading click on the format (pre-populated with .EXE for Windows users) to select the JBR11 bundle from the download page.
Use the JetBrains Toolbox application to download the JBR11 version
Download a JetBrains Runtime using the “Choose Runtime” plugin
Install the plugin “Choose Runtime” as described in the JetBrains knowledge base “Selecting the JDK version the IDE will run under”.
Choose a runtime "jbrsdk-11_0_8-…-x64-b944.34.tar.gz" or later and install it. The IDE will restart.
Go to the settings of the AsciiDoc plugin and check if the preview is set to “JCEF Browser” (recommended if available) or “JavaFX WebView”.
Help, preview is still blurry!
To have the maintainers investigate the issue, open a GitHub issue.