all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: cmr.Pent@gmail.com, 4895@emacsbugs.donarmstrong.com
Cc: bug-gnu-emacs@gnu.org
Subject: bug#4895: 23.1; Incorrect font selected
Date: Tue, 10 Nov 2009 10:32:24 +0900	[thread overview]
Message-ID: <tl73a4n411z.fsf@m17n.org> (raw)
In-Reply-To: <E1N7Zlb-0006fY-GR@neo.paramonovs> (message from Andrey Paramonov on Mon, 09 Nov 2009 22:19:07 +0300)

In article <E1N7Zlb-0006fY-GR@neo.paramonovs>, Andrey Paramonov <pent@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@m17n.org





  reply	other threads:[~2009-11-10  1:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09 19:19 bug#4895: 23.1; Incorrect font selected Andrey Paramonov
2009-11-10  1:32 ` Kenichi Handa [this message]
2009-11-10  6:15   ` Андрей Парамонов
2009-11-10  8:10     ` Kenichi Handa
2009-11-11 10:45       ` Juri Linkov
2012-07-09  5:26         ` Chong Yidong
2012-07-09  8:10           ` Juri Linkov
2012-07-09 16:41           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tl73a4n411z.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=4895@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=cmr.Pent@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.