Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anti aliasing #21

Open
majestrate opened this issue Jun 7, 2020 · 6 comments
Open

anti aliasing #21

majestrate opened this issue Jun 7, 2020 · 6 comments

Comments

@majestrate
Copy link
Owner

currently wterm does no anti-aliasing, that should probably be fixed.

@3ap
Copy link

3ap commented Jul 19, 2020

I did a simple patch for pixman renderer: 3ap@620d1fb
I think it looks much better

20200719_13h13m37s_grim

@manneorama
Copy link

@3ap This patch breaks font rendering completely for me. I don't really know where to start digging since I have exactly 0 experience with font stuff, but I thought you might be interested to know.

Screenshot: https://imgur.com/a/1zAErHx

@3ap
Copy link

3ap commented Aug 1, 2020

@3ap This patch breaks font rendering completely for me. I don't really know where to start digging since I have exactly 0 experience with font stuff, but I thought you might be interested to know.

Screenshot: https://imgur.com/a/1zAErHx

As you can see, you are using "intel" backend from wld (Trying DRM driver intel in your log) for rendering. My patch affects only "pixman" backend. I've looked through the code but I haven't found a quick solution for adding antialias feature in intel backend. As a workaround you can disable intel and nouveau in wld:

diff --git a/src/wld/config.mk b/src/wld/config.mk
index 8f3ee29..1dff3b0 100644
--- a/src/wld/config.mk
+++ b/src/wld/config.mk
@@ -8,7 +8,7 @@ ENABLE_STATIC       = 1
 ENABLE_SHARED       = 0
 
 ENABLE_PIXMAN       = 1
-ENABLE_DRM          = 1
+ENABLE_DRM          = 0
 ENABLE_WAYLAND      = 1
 
 DRM_DRIVERS         = intel nouveau
-- 
2.27.0

Moreover, you can use my branch wterm/antialias with several fixes and patches.

P.S. The author of wld is concerned that implementing antialias feature for intel is not easy: michaelforney/wld#3 (comment)

The two features I still want in wld are alpha-blending and anti-aliased font rendering (kinda hand-in-hand). It is probably not to hard do this for nouveau (from what I could tell), but for intel it would involve the 3D pipeline and reading the xf86-video-intel driver is pretty intimidating because it has lots of logic about when to use the 3D pipeline and when to use the BLT engine.

@manneorama
Copy link

I'm guessing something like Cairo would be considered as too heavyweight?

@3ap
Copy link

3ap commented Aug 2, 2020

I'm guessing something like Cairo would be considered as too heavyweight?

It's true, Cairo is heavyweight, it requires too many dependencies and, in my opinion, it doesn't fit suckless ideology :)

Do you want to use Cairo instead of wld? If I understand well, the good attribute of wld is ability to use vendor-specific GPU drawing API for hardware acceleration. On the other hand, we can use Cairo OpenGL-based API or Cairo DRM-based API to get the same performance (it's only my guess).

However, if we don't want to use hardware acceleration at all, we can drop intel/nouveau backends in wld and rely only on pixman wld backend + freetype (as michaelforney/wld#13 suggests to do) and everything should be OK. In this case it's easy to implement antialias feature, as you see.

@manneorama
Copy link

It most definitely doesn't fit no :). I really enjoy st but as I'm now on Wayland/Sway I've been shopping around for a native terminal emulator with the same philosophy. Probably not the only user but I sure don't really care if my terminal is hardware accelerated or not. Removing DRM-support wouldn't bother me in the slightest. Plus, at least as far as my google-fu has taken me, I haven't found good documentation for the Intel API. And I'm not experienced enough to be able to digest something like xf86-video-intel.

TornadoCookie added a commit to TornadoCookie/wterm that referenced this issue Feb 11, 2024
TornadoCookie added a commit to TornadoCookie/wterm that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants