GNU bug report logs -
#4895
23.1; Incorrect font selected
Previous Next
Reported by: cmr.Pent <at> gmail.com
Date: Mon, 9 Nov 2009 19:25:05 UTC
Severity: normal
Merged with 4365,
11889
Found in version 23.4
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
In article <E1N7Zlb-0006fY-GR <at> neo.paramonovs>, Andrey Paramonov <pent <at> aparamon.msk.ru> writes:
> 0) emacs -Q
> My .Xresources:
> emacs*font: DejaVu Sans Mono-11
> 1) C-x C-f titledefs.dtx (attached)
> Latin characters are displayed with DejaVu Sans Mono, as expected.
> Cyrillic characters are not displayed properly. This is Ok yet,
> because the file is encoded in cp1251.
> 2) C-x RET r cp1251 RET
> yes RET
> Latin characters are displayed with DejaVu Sans Mono, as expected.
> Cyrillic characters are displayed, but not with DejaVu Sans Mono.
> Looks like they are displayed with Terminus.
This is because Emacs prefers a font whose registry matches
with `charset' text property.
In the above case, the default fontset has this entry for
cyrillic:
(cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic)
(nil . "ISO8859-5")
(nil . "microsoft-cp1251")
(nil . "koi8-r"))
and when you read a file with cp1251, the charset property
`cp1251' is put on the buffer text. Thus the font-selector
prefers a font whose registry is "microsoft-cp1251".
If you prefer cyrillic characters to be displayed by the
default font, you can do this in .emacs:
(set-fontset-font "fontset-default" 'cyrillic
(font-spec :registry "iso10646-1" :script 'cyrillic))
---
Kenichi Handa
handa <at> m17n.org
This bug report was last modified 13 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.