JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
693 stars 35 forks source link

Align text style rasterisation settings to the IDE in the bridge #415

Open rock3r opened 3 months ago

rock3r commented 3 months ago

In the IJP, users can select the text antialiasing they want to use:

image

The available options are:

Compose/Skia, on the other hand, defaults to greyscale antialiasing. This results in slightly (more) different text rendering from Swing on Windows (where ClearType, their proprietary subpixel rendering algorithm, is on by default) and Linux when the subpixel antialiasing is enabled on Swing.

This issue is to add facilities to the bridge to ensure the default and editor/console default TextStyles we use in Jewel match the setting in use the IDE (and update accordingly when these change!). We probably also want a new API to create TextStyles with the correct antialiasing settings in the bridge — something like TextStyle.Default(... [all params with defaults]).

rock3r commented 3 months ago

More information on how to implement the different setting in Compose can be found on this PR: https://github.com/JetBrains/compose-multiplatform-core/pull/1102

rock3r commented 2 months ago

Blocked on a Compose bug https://youtrack.jetbrains.com/issue/CMP-5638/Changing-FontRenderingSettings-is-not-reflected-until-composition-is-restarted