From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs 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 Organization: Faculty of Science, Chiba University Message-ID: References: <87bliqnsnv.fsf@PouarArch.i-did-not-set--mail-host-address--so-tickle-me> <83ft81wpv5.fsf@gnu.org> <87pn42np74.fsf@tcd.ie> <20201201141032.79c4fa5f@ventiloplattform.tastytea.de> <20201203091815.32af30af@ventiloplattform.tastytea.de> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27481"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: "Basil L. Contovounesios" , Robert Pluim , Pouar Dragon , 43148@debbugs.gnu.org To: tastytea Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 04 09:42:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kl6fL-0006xb-K8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 09:42:11 +0100 Original-Received: from localhost ([::1]:55008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl6fK-00074E-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 03:42:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kl6fC-00072n-Dk for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2020 03:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kl6fC-0000MN-65 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2020 03:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kl6fC-0000FN-3h for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2020 03:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Dec 2020 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43148 X-GNU-PR-Package: emacs Original-Received: via spool by 43148-submit@debbugs.gnu.org id=B43148.1607071286907 (code B ref 43148); Fri, 04 Dec 2020 08:42:02 +0000 Original-Received: (at 43148) by debbugs.gnu.org; 4 Dec 2020 08:41:26 +0000 Original-Received: from localhost ([127.0.0.1]:42554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl6eb-0000EZ-TN for submit@debbugs.gnu.org; Fri, 04 Dec 2020 03:41:26 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:54562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl6eZ-0000EQ-Sb for 43148@debbugs.gnu.org; Fri, 04 Dec 2020 03:41:25 -0500 Original-Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 07915F08C6; Fri, 4 Dec 2020 17:41:22 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <20201203091815.32af30af@ventiloplattform.tastytea.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194943 Archived-At: On Thu, 03 Dec 2020 17:18:15 +0900, tastytea wrote: >=20 > On 2020-12-03 11:13+0900 YAMAMOTO Mitsuharu > wrote: >=20 > > On Tue, 01 Dec 2020 22:10:32 +0900, > > tastytea wrote: > > >=20 > > > On 2020-11-28 17:22+0900 YAMAMOTO Mitsuharu > > > wrote: > > > =20 > > > > On Wed, 25 Nov 2020 11:30:07 +0900, > > > > Basil L. Contovounesios wrote: =20 > > > > >=20 > > > > > Robert Pluim writes: > > > > > =20 > > > > > >>>>>> On Tue, 01 Sep 2020 17:09:18 +0300, Eli Zaretskii > > > > > >>>>>> said: =20 > > > > > > =20 > > > > > > >> From: Pouar Dragon > > > > > > >> Date: Mon, 31 Aug 2020 21:34:46 -0500 > > > > > > >>=20 > > > > > > >> widgets when building with Xaw and Cairo seem to have > > > > > > >> missing text, looking like this > > > > > > >>=20 > > > > > > >> problem seems to go away when > > > > > > >> 5f4e8e2e088de9fb76cb631077c6eddd3219f594 is reverted > > > > > > >> =20 > > > > > > =20 > > > > > > Eli> Thanks. I hope Yamamoto-san will be able to take a > > > > > > Eli> look at this. =20 > > > > > > > > > > > > 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=CA=BCm surprised it even builds). = =20 > > > > >=20 > > > > > 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. > > > > >=20 > > > > > 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'. > > > > >=20 > > > > > Could the issue depend on e.g. the version of Cairo? (I seem to > > > > > have an older version than the OP.) =20 > > > >=20 > > > > 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). =20 > > >=20 > > > 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. =20 > >=20 > > So, only digits are shown with "$ emacs -Q" ? >=20 > Yes, exactly like the screenshot in the first message. >=20 > > Could you show us the output of "$ fc-match -s sans" ? > >=20 > > 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. >=20 > The list is huge, are the first 10 lines enough? >=20 > 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) =3D=3D FcResul= tNoMatch) + FcPatternAddBool (pattern, FC_COLOR, FcFalse); +#endif FcDefaultSubstitute (pattern); cairo_font_face_t *font_face =3D cairo_ft_font_face_create_for_pattern (pattern);