GNU bug report logs - #54564
29.0.50; [PATCH] Use gsettings font rendering entries for pgtk builds

Previous Next

Package: emacs;

Reported by: Pieter van Prooijen <pieter.van.prooijen <at> teloden.nl>

Date: Fri, 25 Mar 2022 14:10:03 UTC

Severity: normal

Tags: patch

Merged with 54565

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Pieter van Prooijen <pieter.van.prooijen <at> teloden.nl>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 54564 <at> debbugs.gnu.org
Subject: bug#54564: 29.0.50; [PATCH] Use gsettings font rendering entries for pgtk builds
Date: Fri, 08 Apr 2022 07:38:05 +0800
Pieter van Prooijen <pieter.van.prooijen <at> teloden.nl> writes:

> Hi All, 
>
> It took a fair bit of digging, but sub-pixel anti-aliasing on pgtk now
> seems to work correctly.
>
> The problem lies with the "source" operator set by pgtk when drawing a
> font, this will take a particular execution path in the cairo glyph
> compositor (using a mask image) which converts the colors created by
> freetype for the sub pixel effect to greys-cale. Using the default
> "over" operator takes a different path which preserves the colors. Note
> that on small screens the difference between sub-pixel and grey-scale
> rendering is hard to see, it's more pronounced on larger displays)

Ah thanks.  Does this fix the problem as well?

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index b2816aa04a..5fbc56ae81 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -7037,8 +7037,11 @@ pgtk_set_cr_source_with_color (struct frame *f, unsigned long color,
   pgtk_query_color (f, &col);
 
   if (!respects_alpha_background)
-    cairo_set_source_rgb (FRAME_CR_CONTEXT (f), col.red / 65535.0,
-			  col.green / 65535.0, col.blue / 65535.0);
+    {
+      cairo_set_source_rgb (FRAME_CR_CONTEXT (f), col.red / 65535.0,
+			    col.green / 65535.0, col.blue / 65535.0);
+      cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_OVER);
+    }
   else
     {
       cairo_set_source_rgba (FRAME_CR_CONTEXT (f), col.red / 65535.0,

> I've also fixed the indent error, but couldn't find the non-breaking
> space in the patch, it's perhaps caused by the mail program.

It was previously filled with non-breaking spaces, but the patch you
attached looks fine now.

> Regarding the copyright assignment, I've had no response after sending
> in the questionnaire at
> https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/Copyright/request-assign.future
> to assign <at> gnu.org

It takes a while; if you don't get a response in 2 weeks, you should
contact Eli or Lars, and they will ask the folks at the FSF to expedite
things.

> Do you get sent a paper form of some kind which has to be filled in?
> (I'm not at my home address atm so I will have missed that)

You get sent a document you have to print and fill in, I think, but that
depends on the country you're in.

Thanks.




This bug report was last modified 3 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.