GNU bug report logs -
#28236
'configure --with-cairo' causes 'emacs -font' to fail
Previous Next
Reported by: andrei.elkin <at> pp.inet.fi
Date: Fri, 25 Aug 2017 20:00:02 UTC
Severity: normal
Tags: help
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28236 in the body.
You can then email your comments to 28236 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Fri, 25 Aug 2017 20:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
andrei.elkin <at> pp.inet.fi
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 25 Aug 2017 20:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello.
I've been checking out the master branch periodically for quite a while but never
configured it with cairo.
Today I gave it a try, appending the option to my regular option list, as below.
$ git show HEAD
commit 579890f1c7703cd8ecfe2e56f52cc06fcd1b2442
Author: Eli Zaretskii <eliz <at> gnu.org>
Date: Fri Aug 25 18:01:19 2017 +0300
bash# ./configure --with-xft --with-x-toolkit=lucid --with-dbus \
--with-cairo && make ...
=> ... [ ok ]
The resulted executable complains about a font that otherwise
"orthodoxically" built one never has done (as the font really exists,
which xlsfonts double-proves:
bash# xlsfonts | grep 7x14
=>7x14
).
bash# src/emacs -Q -font 7x14
=> Font ‘7x14’ is not defined
This effect is observed in earlier commits as well. (I first suspected the
failure was introduced by a commit in the range started from my last
pull (about two weeks ago)).
I've not investigated any further, still hope this report is not in
vain.
Using this chance, thank you all for working and maintaining this
wonderful piece of software!
Andrelkin.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Sat, 26 Aug 2017 07:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28236 <at> debbugs.gnu.org (full text, mbox):
> From: andrei.elkin <at> pp.inet.fi
> Date: Fri, 25 Aug 2017 22:57:59 +0300
>
> I've been checking out the master branch periodically for quite a while but never
> configured it with cairo.
> Today I gave it a try, appending the option to my regular option list, as below.
>
> $ git show HEAD
> commit 579890f1c7703cd8ecfe2e56f52cc06fcd1b2442
> Author: Eli Zaretskii <eliz <at> gnu.org>
> Date: Fri Aug 25 18:01:19 2017 +0300
>
> bash# ./configure --with-xft --with-x-toolkit=lucid --with-dbus \
> --with-cairo && make ...
> => ... [ ok ]
> The resulted executable complains about a font that otherwise
> "orthodoxically" built one never has done (as the font really exists,
> which xlsfonts double-proves:
>
> bash# xlsfonts | grep 7x14
> =>7x14
> ).
>
> bash# src/emacs -Q -font 7x14
> => Font ‘7x14’ is not defined
>
> This effect is observed in earlier commits as well. (I first suspected the
> failure was introduced by a commit in the range started from my last
> pull (about two weeks ago)).
>
> I've not investigated any further, still hope this report is not in
> vain.
Thanks. Unfortunately, we don't have Cairo experts on board, and
we've accumulated several known issues with that configuration. This
is why the configure script says
--with-cairo compile with Cairo drawing (experimental)
^^^^^^^^^^^^
Added tag(s) help.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 29 Aug 2017 17:09:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Tue, 11 Dec 2018 01:51:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 28236 <at> debbugs.gnu.org (full text, mbox):
On 25.08.2017 22:57, andrei.elkin <at> pp.inet.fi wrote:
> bash# src/emacs -Q -font 7x14
> => Font ‘7x14’ is not defined
FWIW, I can confirm with the latest emacs-26 and master.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Tue, 11 Dec 2018 06:27:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 28236 <at> debbugs.gnu.org (full text, mbox):
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Tue, 11 Dec 2018 03:50:06 +0200
>
> On 25.08.2017 22:57, andrei.elkin <at> pp.inet.fi wrote:
> > bash# src/emacs -Q -font 7x14
> > => Font ‘7x14’ is not defined
>
> FWIW, I can confirm with the latest emacs-26 and master.
Thanks for trying. AFAIU, this is an important user-level feature, so
we should try fixing it if we want to enable Cairo by default.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Wed, 12 Dec 2018 12:04:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 28236 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Dmitry Gutov <dgutov <at> yandex.ru>
>> Date: Tue, 11 Dec 2018 03:50:06 +0200
>>
>> On 25.08.2017 22:57, andrei.elkin <at> pp.inet.fi wrote:
>> > bash# src/emacs -Q -font 7x14
>> > => Font ‘7x14’ is not defined
>>
>> FWIW, I can confirm with the latest emacs-26 and master.
>
> Thanks for trying. AFAIU, this is an important user-level feature, so
> we should try fixing it if we want to enable Cairo by default.
>
I can get the same result also without Cairo:
emacs-26.1 --xrm "Emacs.fontBackend: xft" -q -font 7x14
When I copy the font where fontconfig can see it:
cp /usr/share/X11/fonts/misc/7x14.pcf.gz ~/.local/share/fonts/
fc-cache -vf
I see this:
fc-list | grep 7x14
=> /home/arirop/.local/share/fonts/7x14.pcf.gz: Fixed:style=Regular
After that, using "-font Fixed" seems to work.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Wed, 12 Dec 2018 15:17:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 28236 <at> debbugs.gnu.org (full text, mbox):
> From: Ari Roponen <ari.roponen <at> gmail.com>
> Cc: Dmitry Gutov <dgutov <at> yandex.ru>, 28236 <at> debbugs.gnu.org, andrei.elkin <at> pp.inet.fi
> Date: Wed, 12 Dec 2018 14:03:48 +0200
>
> >> On 25.08.2017 22:57, andrei.elkin <at> pp.inet.fi wrote:
> >> > bash# src/emacs -Q -font 7x14
> >> > => Font ‘7x14’ is not defined
> >>
> >> FWIW, I can confirm with the latest emacs-26 and master.
> >
> > Thanks for trying. AFAIU, this is an important user-level feature, so
> > we should try fixing it if we want to enable Cairo by default.
> >
>
> I can get the same result also without Cairo:
> emacs-26.1 --xrm "Emacs.fontBackend: xft" -q -font 7x14
>
> When I copy the font where fontconfig can see it:
> cp /usr/share/X11/fonts/misc/7x14.pcf.gz ~/.local/share/fonts/
> fc-cache -vf
> I see this:
> fc-list | grep 7x14
> => /home/arirop/.local/share/fonts/7x14.pcf.gz: Fixed:style=Regular
>
> After that, using "-font Fixed" seems to work.
So you are saying that the problem here is that Cairo can only work
with fonts known fontconfig, and cannot switch to font backend(s) that
bypass fontconfig? If so, perhaps just an entry in PROBLEMS with the
above recipe would suffice as a workaround?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Wed, 12 Dec 2018 15:43:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 28236 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> So you are saying that the problem here is that Cairo can only work
> with fonts known fontconfig, and cannot switch to font backend(s) that
> bypass fontconfig? If so, perhaps just an entry in PROBLEMS with the
> above recipe would suffice as a workaround?
I find that surprising. The non-Cairo GTK build can use Xft and X font
backends, what's different about Cairo?
(I just tried to set font-backend to '(ftcr x) on my Cairo build, and
failed, so perhaps it really isnʼt supported).
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Wed, 12 Dec 2018 16:39:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 28236 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Ari Roponen <ari.roponen <at> gmail.com>, 28236 <at> debbugs.gnu.org, andrei.elkin <at> pp.inet.fi, dgutov <at> yandex.ru
> Date: Wed, 12 Dec 2018 16:41:52 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > So you are saying that the problem here is that Cairo can only work
> > with fonts known fontconfig, and cannot switch to font backend(s) that
> > bypass fontconfig? If so, perhaps just an entry in PROBLEMS with the
> > above recipe would suffice as a workaround?
>
> I find that surprising. The non-Cairo GTK build can use Xft and X font
> backends, what's different about Cairo?
>
> (I just tried to set font-backend to '(ftcr x) on my Cairo build, and
> failed, so perhaps it really isnʼt supported).
I'm guessing that the other font backends use X calls that cannot be
supported with Cairo drawing, or maybe such support simply wasn't
coded yet. But I'm not an expert on this stuff, so maybe I'm wrong.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Thu, 13 Dec 2018 11:36:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 28236 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: Ari Roponen <ari.roponen <at> gmail.com>, 28236 <at> debbugs.gnu.org, andrei.elkin <at> pp.inet.fi, dgutov <at> yandex.ru
>> Date: Wed, 12 Dec 2018 16:41:52 +0100
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > So you are saying that the problem here is that Cairo can only work
>> > with fonts known fontconfig, and cannot switch to font backend(s) that
>> > bypass fontconfig? If so, perhaps just an entry in PROBLEMS with the
>> > above recipe would suffice as a workaround?
>>
>> I find that surprising. The non-Cairo GTK build can use Xft and X font
>> backends, what's different about Cairo?
>>
>> (I just tried to set font-backend to '(ftcr x) on my Cairo build, and
>> failed, so perhaps it really isnʼt supported).
>
> I'm guessing that the other font backends use X calls that cannot be
> supported with Cairo drawing, or maybe such support simply wasn't
> coded yet. But I'm not an expert on this stuff, so maybe I'm wrong.
So xfns.c only initializes the xfont driver when not using Cairo. I
made the obvious changes there, and 'emacs -Q -fn 7x14' starts up, and
'C-u C-x =' tells me:
x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 (#x68)
Unfortunately *scratch* does not (re-)display properly [1], so unless
weʼre feeling really adventurous, we probably shouldn't enable both
Cairo and the X font back on master, etc/PROBLEMS (or NEWS?) might be
better.
Robert
Footnotes:
[1] Admittedly this is over an ssh forwarded connection. Running it
locally might look better.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Thu, 13 Dec 2018 13:54:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 28236 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: 28236 <at> debbugs.gnu.org, ari.roponen <at> gmail.com, andrei.elkin <at> pp.inet.fi, dgutov <at> yandex.ru
> Date: Thu, 13 Dec 2018 12:34:54 +0100
>
> So xfns.c only initializes the xfont driver when not using Cairo. I
> made the obvious changes there, and 'emacs -Q -fn 7x14' starts up, and
> 'C-u C-x =' tells me:
>
> x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 (#x68)
>
> Unfortunately *scratch* does not (re-)display properly
Can you tell more details about this improper redisplay?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Thu, 13 Dec 2018 14:57:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 28236 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: 28236 <at> debbugs.gnu.org, ari.roponen <at> gmail.com, andrei.elkin <at> pp.inet.fi, dgutov <at> yandex.ru
>> Date: Thu, 13 Dec 2018 12:34:54 +0100
>>
>> So xfns.c only initializes the xfont driver when not using Cairo. I
>> made the obvious changes there, and 'emacs -Q -fn 7x14' starts up, and
>> 'C-u C-x =' tells me:
>>
>> x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 (#x68)
>>
>> Unfortunately *scratch* does not (re-)display properly
>
> Can you tell more details about this improper redisplay?
I see text for the menu-bar, but *scratch* looks empty (and thereʼs no
text displayed in the mode-line). The text is actually there in
*scratch*, though.
I donʼt think this is a viable path to look at, especially given Ari's
workaround of copying the required fonts.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28236
; Package
emacs
.
(Tue, 04 Jun 2019 07:49:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 28236 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 13 Dec 2018 23:56:21 +0900,
Robert Pluim wrote:
>
> >> So xfns.c only initializes the xfont driver when not using Cairo. I
> >> made the obvious changes there, and 'emacs -Q -fn 7x14' starts up, and
> >> 'C-u C-x =' tells me:
> >>
> >> x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 (#x68)
> >>
> >> Unfortunately *scratch* does not (re-)display properly
> >
> > Can you tell more details about this improper redisplay?
>
> I see text for the menu-bar, but *scratch* looks empty (and thereʼs no
> text displayed in the mode-line). The text is actually there in
> *scratch*, though.
>
> I donʼt think this is a viable path to look at, especially given Ari's
> workaround of copying the required fonts.
Previously the cairo drawing code does its own double-buffering using
the image surface, where all the drawing should happen on the client
side and not compatible with X core fonts that are drawn on the server
side. Copying back the result of server side drawing is not
impossible, but inefficient.
Recently, I've made a change to the cairo drawing code in the master
so it draws into Xlib surfaces instead of image ones if the X Double
Buffer Extension is available. On top of that, it is rather
straightforward to cope with X core fonts.
I implemented both in the attached patch. The former corresponds to
the case that the frame parameter `inhibit-double-buffering' is t, and
the latter to nil. I think the latter is usable, but the former is
not. The code for the former is not an total waste because we can use
it for exporting displayed contents to bitmap images, i.e.,
(x-export-frames FRAME 'png). The same approach cannot be used for
exporting to outline images (PDF or SVG), so characters in X core
fonts are replaced with hollow boxes in such cases.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
[cairo-xfont.diff (application/octet-stream, attachment)]
Reply sent
to
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
:
You have taken responsibility.
(Sat, 08 Jun 2019 05:14:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
andrei.elkin <at> pp.inet.fi
:
bug acknowledged by developer.
(Sat, 08 Jun 2019 05:14:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 28236-done <at> debbugs.gnu.org (full text, mbox):
On Tue, 04 Jun 2019 16:47:56 +0900,
YAMAMOTO Mitsuharu wrote:
>
> On Thu, 13 Dec 2018 23:56:21 +0900,
> Robert Pluim wrote:
> >
> > >> So xfns.c only initializes the xfont driver when not using Cairo. I
> > >> made the obvious changes there, and 'emacs -Q -fn 7x14' starts up, and
> > >> 'C-u C-x =' tells me:
> > >>
> > >> x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 (#x68)
> > >>
> > >> Unfortunately *scratch* does not (re-)display properly
> > >
> > > Can you tell more details about this improper redisplay?
> >
> > I see text for the menu-bar, but *scratch* looks empty (and thereʼs no
> > text displayed in the mode-line). The text is actually there in
> > *scratch*, though.
> >
> > I donʼt think this is a viable path to look at, especially given Ari's
> > workaround of copying the required fonts.
>
> Previously the cairo drawing code does its own double-buffering using
> the image surface, where all the drawing should happen on the client
> side and not compatible with X core fonts that are drawn on the server
> side. Copying back the result of server side drawing is not
> impossible, but inefficient.
>
> Recently, I've made a change to the cairo drawing code in the master
> so it draws into Xlib surfaces instead of image ones if the X Double
> Buffer Extension is available. On top of that, it is rather
> straightforward to cope with X core fonts.
>
> I implemented both in the attached patch. The former corresponds to
> the case that the frame parameter `inhibit-double-buffering' is t, and
> the latter to nil. I think the latter is usable, but the former is
> not. The code for the former is not an total waste because we can use
> it for exporting displayed contents to bitmap images, i.e.,
> (x-export-frames FRAME 'png). The same approach cannot be used for
> exporting to outline images (PDF or SVG), so characters in X core
> fonts are replaced with hollow boxes in such cases.
Pushed to master as faf10bd8eb3.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 06 Jul 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.