1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-11 03:27:05 +03:00
wezterm/wezterm-gui
Wez Furlong 28d803e3f4 refine dual source blending / subpixel aa and RGBA color interaction
Previously, we'd unconditionally enable dual source blending for the
text foreground layer when rendering. That meant that if the user had
configured the fg color to include an alpha value it would get "stamped
through" the draw all the way to the background, making that whole pixel
take on that alpha value rather than allowing it to blend through the
way you might expect.

In prior releases that didn't matter, but since we now allow configuring
the fg color with alpha, and allow using escape sequences to set the fg
for a span to something with alpha, there is now a much higher chance of
something looking weird.

Dual source blending is only really needed for subpixel-aa and that
isn't enabled by default.

This commit changes the behavior to use regular alpha blending if the
main config (rather than a per-font override) hasn't set the freetype
load/render target to one that enables subpixel-aa.

That means that alpha channel values work as expected for fg color
by default.

If you want to enable subpixel-aa you need to enable it globally
and be aware that it will cause weirdness when trying to use alpha
channels for the fg text color.

The docs now also indicate this behavior.

This limitation could be removed by making text rendering significantly
more complex and I don't fancy doing that at this time.
2022-08-06 17:41:44 -07:00
..
src refine dual source blending / subpixel aa and RGBA color interaction 2022-08-06 17:41:44 -07:00
build.rs Improve RESIZE window_decoration on Windows 2022-03-26 07:27:54 -07:00
Cargo.toml add distro-defaults feature 2022-07-10 16:34:43 -07:00