* Use another font for some characters
@ 2016-10-01 18:10 Alex Kost
2016-10-02 4:59 ` Nikolay Kudryavtsev
2016-10-02 6:52 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Alex Kost @ 2016-10-01 18:10 UTC (permalink / raw)
To: help-gnu-emacs
Hello, in Emacs 24.5.1 (and earlier) I can use this:
(set-fontset-font "fontset-default" '(#x2190 . #x2195) "Symbola")
and this range of characters (which is the following arrows: ← ↑ → ↓ ↔
↕), is displayed using "Symbola" font.
However in Emacs 25, the same set-fontset-font call doesn't take any
visible effect – the arrow characters are still displayed with my
default font (Liberation Mono).
So is there a way to achieve what I want in Emacs 25, I mean is there a
way to specify another font for characters that are supported by a
default font?
I think the mentioned difference in Emacs versions was introduced by one
of the commits made for <http://bugs.gnu.org/20727>, but I'm not sure if
this is a bug, or I just miss something, thanks.
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Use another font for some characters
2016-10-01 18:10 Use another font for some characters Alex Kost
@ 2016-10-02 4:59 ` Nikolay Kudryavtsev
2016-10-02 8:48 ` Alex Kost
2016-10-02 6:52 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: Nikolay Kudryavtsev @ 2016-10-02 4:59 UTC (permalink / raw)
To: Alex Kost, help-gnu-emacs
If you specify it like this:
(set-fontset-font t '(#x2190 . #x2195) "Symbola")
Does it work?
--
Best Regards,
Nikolay Kudryavtsev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Use another font for some characters
2016-10-01 18:10 Use another font for some characters Alex Kost
2016-10-02 4:59 ` Nikolay Kudryavtsev
@ 2016-10-02 6:52 ` Eli Zaretskii
2016-10-02 8:46 ` Alex Kost
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2016-10-02 6:52 UTC (permalink / raw)
To: help-gnu-emacs
> From: Alex Kost <alezost@gmail.com>
> Date: Sat, 01 Oct 2016 21:10:38 +0300
>
> Hello, in Emacs 24.5.1 (and earlier) I can use this:
>
> (set-fontset-font "fontset-default" '(#x2190 . #x2195) "Symbola")
>
> and this range of characters (which is the following arrows: ← ↑ → ↓ ↔
> ↕), is displayed using "Symbola" font.
>
> However in Emacs 25, the same set-fontset-font call doesn't take any
> visible effect – the arrow characters are still displayed with my
> default font (Liberation Mono).
Emacs 25 will use the default font for any punctuation and symbol
characters supported by that font, even if the fontset specifies
another font for them. That's because switching to another font has
some unpleasant effects, like slower redisplay, misalignment of text,
inability to compose characters, etc.
Many fonts used for the default face have good coverage of symbols and
punctuation, but don't advertise that by stating the support for the
'symbol' script in their metadata. Previously, on many systems, these
characters needed a special setup in the default fontset, for no good
reason. Now you only need to set up those which your default font
doesn't support, and for which the default fontset doesn't already
specify a font that is installed on your system.
May I ask why you don't want these characters displayed by your
default font?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Use another font for some characters
2016-10-02 6:52 ` Eli Zaretskii
@ 2016-10-02 8:46 ` Alex Kost
2016-10-02 9:22 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-10-02 8:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii (2016-10-02 09:52 +0300) wrote:
>> From: Alex Kost <alezost@gmail.com>
>> Date: Sat, 01 Oct 2016 21:10:38 +0300
>>
>> Hello, in Emacs 24.5.1 (and earlier) I can use this:
>>
>> (set-fontset-font "fontset-default" '(#x2190 . #x2195) "Symbola")
>>
>> and this range of characters (which is the following arrows: ← ↑ → ↓ ↔
>> ↕), is displayed using "Symbola" font.
>>
>> However in Emacs 25, the same set-fontset-font call doesn't take any
>> visible effect – the arrow characters are still displayed with my
>> default font (Liberation Mono).
>
> Emacs 25 will use the default font for any punctuation and symbol
> characters supported by that font, even if the fontset specifies
> another font for them. That's because switching to another font has
> some unpleasant effects, like slower redisplay, misalignment of text,
> inability to compose characters, etc.
Ah, what a misfortune. Then this sounds like a bug (a missing feature
rather) for me.
Just to mention: these unpleasant effects don't bother me.
> Many fonts used for the default face have good coverage of symbols and
> punctuation, but don't advertise that by stating the support for the
> 'symbol' script in their metadata. Previously, on many systems, these
> characters needed a special setup in the default fontset, for no good
> reason. Now you only need to set up those which your default font
> doesn't support, and for which the default fontset doesn't already
> specify a font that is installed on your system.
I see, thanks for the explanation, but I think there should be a way to
override the default font if a user wants to do it.
> May I ask why you don't want these characters displayed by your
> default font?
Because Symbola's arrows look much better for me! I mean I like my
default font (Liberation) for most characters, but for some characters I
prefer to use other fonts.
Thanks again for answering.
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Use another font for some characters
2016-10-02 8:46 ` Alex Kost
@ 2016-10-02 9:22 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2016-10-02 9:22 UTC (permalink / raw)
To: help-gnu-emacs
> From: Alex Kost <alezost@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Sun, 02 Oct 2016 11:46:58 +0300
>
> Just to mention: these unpleasant effects don't bother me.
Please also note that Symbola is a variable-pitch font. It might not
bother you, but others might very well be bothered (and were bothered
during the Emacs 25 development), which is why we switched to use the
default font (which is always monospaced) in the default
configuration.
> > May I ask why you don't want these characters displayed by your
> > default font?
>
> Because Symbola's arrows look much better for me! I mean I like my
> default font (Liberation) for most characters, but for some characters I
> prefer to use other fonts.
Then please file a feature request bug report for this aspect to be
customizable. We could add a user option to disable the automatic use
of the default font for symbols and punctuation.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-02 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-01 18:10 Use another font for some characters Alex Kost
2016-10-02 4:59 ` Nikolay Kudryavtsev
2016-10-02 8:48 ` Alex Kost
2016-10-02 6:52 ` Eli Zaretskii
2016-10-02 8:46 ` Alex Kost
2016-10-02 9:22 ` Eli Zaretskii
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).