unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* FC_COLOR in src/ftfont.c
@ 2018-04-03 13:05 jpff
  2018-04-03 13:58 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: jpff @ 2018-04-03 13:05 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 478 bytes --]

Just pulled from git and got

   CC       ftfont.o
ftfont.c: In function ‘ftfont_spec_pattern’:
ftfont.c:771:38: error: ‘FC_COLOR’ undeclared (first use in this function)
        && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse))
                                       ^
ftfont.c:771:38: note: each undeclared identifier is reported only once 
for each function it appears in
Makefile:382: recipe for target 'ftfont.o' failed

OpenSuSE Leap42.3 with GNU/emacs 27.0.50

==John ff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FC_COLOR in src/ftfont.c
  2018-04-03 13:05 FC_COLOR in src/ftfont.c jpff
@ 2018-04-03 13:58 ` Eli Zaretskii
  2018-04-03 15:15   ` jpff
  2018-04-03 15:17   ` Paul Eggert
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-04-03 13:58 UTC (permalink / raw)
  To: jpff; +Cc: emacs-devel

> Date: Tue, 3 Apr 2018 14:05:52 +0100 (BST)
> From: jpff <jpff@codemist.co.uk>
> 
> Just pulled from git and got
> 
>    CC       ftfont.o
> ftfont.c: In function ‘ftfont_spec_pattern’:
> ftfont.c:771:38: error: ‘FC_COLOR’ undeclared (first use in this function)
>         && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse))
>                                        ^
> ftfont.c:771:38: note: each undeclared identifier is reported only once 
> for each function it appears in
> Makefile:382: recipe for target 'ftfont.o' failed
> 
> OpenSuSE Leap42.3 with GNU/emacs 27.0.50

What is your version of fontconfig?

I guess the solution depends on whether systems with fontconfig that
doesn't support FC_COLOR are still susceptible to the original bug.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FC_COLOR in src/ftfont.c
  2018-04-03 13:58 ` Eli Zaretskii
@ 2018-04-03 15:15   ` jpff
  2018-04-03 15:17   ` Paul Eggert
  1 sibling, 0 replies; 5+ messages in thread
From: jpff @ 2018-04-03 15:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 893 bytes --]

#define FC_MAJOR        2
#define FC_MINOR        11
#define FC_REVISION     1


On Tue, 3 Apr 2018, Eli Zaretskii wrote:

>> Date: Tue, 3 Apr 2018 14:05:52 +0100 (BST)
>> From: jpff <jpff@codemist.co.uk>
>>
>> Just pulled from git and got
>>
>>    CC       ftfont.o
>> ftfont.c: In function ‘ftfont_spec_pattern’:
>> ftfont.c:771:38: error: ‘FC_COLOR’ undeclared (first use in this function)
>>         && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse))
>>                                        ^
>> ftfont.c:771:38: note: each undeclared identifier is reported only once
>> for each function it appears in
>> Makefile:382: recipe for target 'ftfont.o' failed
>>
>> OpenSuSE Leap42.3 with GNU/emacs 27.0.50
>
> What is your version of fontconfig?
>
> I guess the solution depends on whether systems with fontconfig that
> doesn't support FC_COLOR are still susceptible to the original bug.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FC_COLOR in src/ftfont.c
  2018-04-03 13:58 ` Eli Zaretskii
  2018-04-03 15:15   ` jpff
@ 2018-04-03 15:17   ` Paul Eggert
  2018-04-03 15:46     ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2018-04-03 15:17 UTC (permalink / raw)
  To: Eli Zaretskii, jpff; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

On 04/03/2018 06:58 AM, Eli Zaretskii wrote:
> I guess the solution depends on whether systems with fontconfig that
> doesn't support FC_COLOR are still susceptible to the original bug.

I doubt whether they're susceptible. Even if they are, we're better off 
compiling Emacs on such systems rather than having the build fail; at 
least that way we can further debug the problem. So I installed the 
attached workaround to help move the ball forward.


[-- Attachment #2: 0001-Port-FC_COLOR-change-to-older-fontconfig.txt --]
[-- Type: text/plain, Size: 1099 bytes --]

From 0f923ac2629c819cb16860d154945485e48287cb Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 3 Apr 2018 08:12:41 -0700
Subject: [PATCH] Port FC_COLOR change to older fontconfig
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by John ff in:
https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html
* src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]:
Don’t use FC_COLOR on older fontconfigs that don’t have it.
---
 src/ftfont.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ftfont.c b/src/ftfont.c
index 24a92dd52e..84e4a30389 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -764,7 +764,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
   if (scalable >= 0
       && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse))
     goto err;
-#ifdef HAVE_XFT
+#if defined HAVE_XFT && defined FC_COLOR
   /* We really don't like color fonts, they cause Xft crashes.  See
      Bug#30874.  */
   if (Vxft_ignore_color_fonts
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: FC_COLOR in src/ftfont.c
  2018-04-03 15:17   ` Paul Eggert
@ 2018-04-03 15:46     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-04-03 15:46 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel, jpff

> Cc: emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 3 Apr 2018 08:17:08 -0700
> 
> On 04/03/2018 06:58 AM, Eli Zaretskii wrote:
> > I guess the solution depends on whether systems with fontconfig that
> > doesn't support FC_COLOR are still susceptible to the original bug.
> 
> I doubt whether they're susceptible. Even if they are, we're better off 
> compiling Emacs on such systems rather than having the build fail

That's a given, but I meant something else: should we just #ifdef away
that part, as you did, or should we find an equivalent code that
rejects color fonts even though FC_COLOR is not defined.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-03 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 13:05 FC_COLOR in src/ftfont.c jpff
2018-04-03 13:58 ` Eli Zaretskii
2018-04-03 15:15   ` jpff
2018-04-03 15:17   ` Paul Eggert
2018-04-03 15:46     ` Eli Zaretskii

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).