unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: tastytea <tastytea@tastytea.de>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	Robert Pluim <rpluim@gmail.com>, Pouar Dragon <pouar@pouar.net>,
	43148@debbugs.gnu.org
Subject: bug#43148: 27.1; Widget text seems to disappear when building with Cairo and Xaw
Date: Fri, 04 Dec 2020 17:41:21 +0900	[thread overview]
Message-ID: <wlft4mote6.wl-mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <20201203091815.32af30af@ventiloplattform.tastytea.de>

On Thu, 03 Dec 2020 17:18:15 +0900,
tastytea wrote:
> 
> On 2020-12-03 11:13+0900 YAMAMOTO Mitsuharu
> <mituharu@math.s.chiba-u.ac.jp> wrote:
> 
> > On Tue, 01 Dec 2020 22:10:32 +0900,
> > tastytea wrote:
> > > 
> > > On 2020-11-28 17:22+0900 YAMAMOTO Mitsuharu
> > > <mituharu@math.s.chiba-u.ac.jp> wrote:
> > >   
> > > > On Wed, 25 Nov 2020 11:30:07 +0900,
> > > > Basil L. Contovounesios wrote:  
> > > > > 
> > > > > Robert Pluim <rpluim@gmail.com> writes:
> > > > >     
> > > > > >>>>>> On Tue, 01 Sep 2020 17:09:18 +0300, Eli Zaretskii
> > > > > >>>>>> <eliz@gnu.org> said:    
> > > > > >    
> > > > > >     >> From: Pouar Dragon <pouar@pouar.net>
> > > > > >     >> Date: Mon, 31 Aug 2020 21:34:46 -0500
> > > > > >     >> 
> > > > > >     >> widgets when building with Xaw and Cairo seem to have
> > > > > >     >> missing text, looking like this
> > > > > >     >> 
> > > > > >     >> problem seems to go away when
> > > > > >     >> 5f4e8e2e088de9fb76cb631077c6eddd3219f594 is reverted
> > > > > >     >>  
> > > > > >    
> > > > > >     Eli> Thanks.  I hope Yamamoto-san will be able to take a
> > > > > >     Eli> look at this.    
> > > > > >
> > > > > > Putting on my 'let's simplify' hat, is this really a
> > > > > > combination we want to spend time on? Lucid + Xaw + Cairo is
> > > > > > decidedly non-mainstream (Iʼm surprised it even builds).    
> > > > > 
> > > > > FWIW, I've been happily using Lucid + Xaw3D for several years,
> > > > > and Cairo ever since it became stable in Emacs 27 and the
> > > > > default configuration in Emacs 28.
> > > > > 
> > > > > I usually have menu-bar-mode off, but like other reports in this
> > > > > thread, the menus look fine when I do open them, e.g. after
> > > > > 'emacs -Q'.
> > > > > 
> > > > > Could the issue depend on e.g. the version of Cairo?  (I seem to
> > > > > have an older version than the OP.)    
> > > > 
> > > > Possibly.  The OP seems to use cairo 1.17.3, which is not a
> > > > release version (the latest is 1.16.0) and even not the snapshot
> > > > one (the latest is 1.17.2 according to
> > > > https://cairographics.org).  
> > > 
> > > I experience the same issue as the OP with lucid and cairo 1.16.0,
> > > with and without xaw3d, on Gentoo Linux. The problem goes away if I
> > > disable cairo.
> > > The same happens with 28.0.50, commit
> > > 1a3aa6043a51e5bb4007889dd7dcabb55dc44132.  
> > 
> > So, only digits are shown with "$ emacs -Q" ?
> 
> Yes, exactly like the screenshot in the first message.
> 
> > Could you show us the output of "$ fc-match -s sans" ?
> > 
> > I tried the latest snapshot cairo 1.17.4 on XQuartz/macOS, and I don't
> > see any problems.  On my side, "$ fc-match -s sans" reports Arial
> > Unicode.ttf at the first line.
> 
> The list is huge, are the first 10 lines enough?
> 
> SourceSansPro-Regular.otf: "Source Sans Pro" "Regular"
> NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"
> LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
> DejaVuSans.ttf: "DejaVu Sans" "Book"
> DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
> DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
> DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
> luxisr.ttf: "Luxi Sans" "Regular"
> l048013t.pfa: "Luxi Sans" "Regular"
> n019003l.pfb: "Nimbus Sans L" "Regular"

Thanks.  I conjectured Noto Color Emoji, which contains digit glyphs
but not for letter ones, would come first.  But that is not the case.
I don't know why Source Sans Pro is not used then (libotf is for
handling OTF features and not necessary just for displaying).

Anyway, could you try if the following patch works?

			     YAMAMOTO Mitsuharu
			mituharu@math.s.chiba-u.ac.jp

diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c
index f15cb603a8..f938b55b5a 100644
--- a/lwlib/lwlib-utils.c
+++ b/lwlib/lwlib-utils.c
@@ -161,6 +161,11 @@ crxft_font_open_name (Display *dpy, int screen, const char *name)
 		   / DisplayHeightMM (dpy, screen));
 	  FcPatternAddDouble (pattern, FC_DPI, dpi);
 	}
+#ifdef FC_COLOR
+      FcBool color_p;
+      if (FcPatternGetBool (pattern, FC_COLOR, 0, &color_p) == FcResultNoMatch)
+	FcPatternAddBool (pattern, FC_COLOR, FcFalse);
+#endif
       FcDefaultSubstitute (pattern);
       cairo_font_face_t *font_face
 	= cairo_ft_font_face_create_for_pattern (pattern);





  reply	other threads:[~2020-12-04  8:41 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  2:21 bug#43147: 27.1; Widget text seems to disappear when building with Cairo and Xaw Pouar Dragon
2020-09-01 14:09 ` bug#43148: " Eli Zaretskii
2020-09-01 15:05   ` Robert Pluim
2020-09-01 15:51     ` Eli Zaretskii
2020-09-01 16:13       ` Robert Pluim
2020-09-01 16:48         ` Eli Zaretskii
2020-09-02  6:59           ` Robert Pluim
2020-09-02 10:24             ` James Cloos
2020-09-02 10:45               ` Robert Pluim
2020-09-02 14:05               ` Eli Zaretskii
2020-09-02 14:28                 ` James Cloos
2020-09-02 14:50                   ` Eli Zaretskii
2020-09-02 15:19                     ` Robert Pluim
2020-09-02 15:25                       ` Eli Zaretskii
2020-09-02 13:57             ` Eli Zaretskii
2020-09-02 11:38     ` Peder O. Klingenberg
2020-09-03  9:09       ` Robert Pluim
2020-09-03  9:18         ` Robert Pluim
2020-11-25  2:30     ` Basil L. Contovounesios
2020-11-28  8:22       ` YAMAMOTO Mitsuharu
2020-12-01 13:10         ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-03  2:13           ` YAMAMOTO Mitsuharu
2020-12-03  8:18             ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-04  8:41               ` YAMAMOTO Mitsuharu [this message]
2020-12-04  9:28                 ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-04  9:48                   ` Robert Pluim
2020-12-04 10:09                     ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-04 10:33                       ` Robert Pluim
2020-12-04 10:58                         ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-04 11:46                           ` Robert Pluim
2020-12-04 12:14                             ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-05  6:51                   ` YAMAMOTO Mitsuharu
2020-12-05  7:14                     ` tastytea via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-06  5:26                       ` YAMAMOTO Mitsuharu
2020-12-06  5:58                         ` Eli Zaretskii
2020-09-02  2:15 ` YAMAMOTO Mitsuharu
2020-09-28 10:46   ` Pouar Dragon
2020-11-23 17:38     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlft4mote6.wl-mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=43148@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=pouar@pouar.net \
    --cc=rpluim@gmail.com \
    --cc=tastytea@tastytea.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).