Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

emacs and fallback fonts

95 views
Skip to first unread message

Francesco Mazzoli

unread,
Mar 17, 2012, 9:22:21 PM3/17/12
to help-gn...@gnu.org
Hi list,

I am trying to get emacs to fallback nicely when my font of choice
(Terminus) doesn't have a symbol.

Using something like

(set-fontset-font "fontset-default" 'unicode "DejaVu Sans Mono-10")

works, but then *every* unicode symbol is displayed using DejaVu.

I couldn't find a way to configure the fallback font only (without even
caring about unicode, I just want the missing symbols to be displayed
with a font that I choose).

This message seems to ask the same question:
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-03/msg00154.html ,
but there was no answer, so I am asking again.

Francesco.

Peter Dyballa

unread,
Mar 18, 2012, 11:35:02 AM3/18/12
to Francesco Mazzoli, help-gn...@gnu.org

Am 18.3.2012 um 02:22 schrieb Francesco Mazzoli:

> I am trying to get emacs to fallback nicely when my font of choice (Terminus) doesn't have a symbol.

Do you know of any X11 application that can perform what you wish? How is it when look with vi(m), pico, nano from xterm with Terminus at the same places of the same file? How is the font selection working here? How are Open/LibreOffice performing?

--
Greetings

Pete

America believes in education: the average professor earns more money in a year than a professional athlete earns in a whole week.
– Evan Esar


Francesco Mazzoli

unread,
Mar 19, 2012, 10:21:17 AM3/19/12
to Peter Dyballa, help-gn...@gnu.org
On 18/03/12 15:35, Peter Dyballa wrote:
>
> Am 18.3.2012 um 02:22 schrieb Francesco Mazzoli:
>
>> I am trying to get emacs to fallback nicely when my font of choice (Terminus) doesn't have a symbol.
>
> Do you know of any X11 application that can perform what you wish? How is it when look with vi(m), pico, nano from xterm with Terminus at the same places of the same file? How is the font selection working here? How are Open/LibreOffice performing?

Well the current situation is that DejaVu Sans Mono is used as a
fallback in all the applications. The problem is that Terminus-12 is
smaller than DejaVu Sans Mono-12, so emacs squashes the bigger
characters resulting in illegible characters.

I tried configuring fontconfig like so, to have DejaVu Sans Mono to be
smaller:

<match target="pattern">
<test name="family">
<string>Terminus</string>
</test>
<edit binding="strong" mode="append" name="family">
<string>DejaVu Sans Mono</string>
</edit>
<edit binding="strong" mode="append" name="size">
10
</edit>
</match>

But it doesn't seem to work, and I wasn't able to find a suitable
configuration, so I was looking for an emacs-specific solution...

Francesco.

Peter Dyballa

unread,
Mar 21, 2012, 5:55:00 AM3/21/12
to Francesco Mazzoli, help-gn...@gnu.org

Am 19.3.2012 um 15:21 schrieb Francesco Mazzoli:

> But it doesn't seem to work, and I wasn't able to find a suitable configuration, so I was looking for an emacs-specific solution...

See here for creating font sets which tell GNU Emacs which particular glyphs are to be taken from other fonts: http://www.emacswiki.org/emacs/FontSets. The file can become large...

--
Greetings

Pete

People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install MS Windows.


Francesco Mazzoli

unread,
Mar 22, 2012, 6:00:31 PM3/22/12
to Peter Dyballa, help-gn...@gnu.org
> See here for creating font sets which tell GNU Emacs which particular glyphs are to be taken from other fonts: http://www.emacswiki.org/emacs/FontSets. The file can become large...

Yes, I guess I could manually set each character, but I was hoping for a
more general solution...

Francesco.


Peter Dyballa

unread,
Mar 22, 2012, 6:26:54 PM3/22/12
to Francesco Mazzoli, help-gn...@gnu.org

Am 22.3.2012 um 23:00 schrieb Francesco Mazzoli:

> Yes, I guess I could manually set each character, but I was hoping for a more general solution...

There is at least one! In Mac OS X a variant of GNU Emacs runs that asks the system's fonts service for a font to display a particular glyph. This fonts service is quite clever...

--
Greetings

Pete

Got Mole problems?
Call Avogadro 6.02 x 10^23


0 new messages