all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Florian Beck <abstraktion@t-online.de>
To: Xah Lee <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: getting unicode chars to show on Windows
Date: Fri, 28 Aug 2009 12:40:31 +0200	[thread overview]
Message-ID: <87y6p48bmo.fsf@sophokles.streitblatt.de> (raw)
In-Reply-To: <6e107769-cd13-43f0-ac9f-8daa9fb83c5e@a39g2000pre.googlegroups.com> (Xah Lee's message of "Thu, 27 Aug 2009 11:36:31 -0700 (PDT)")

Xah Lee <xahlee@gmail.com> writes:

> On Aug 26, 3:09 pm, Jason Rumney <jasonrum...@gmail.com> wrote:
>> On Aug 26, 7:35 pm, Xah Lee <xah...@gmail.com> wrote:
>>
>> > humm... it show for you Eli out of the box. Strange.
>>
>> Some fonts, particularly CJK ones which tend to cover a substantial
>> part of the BMP but have many gaps, seem to get in the way of (nearly)
>> full coverage fonts like Arial Unicode MS by default.
>>
>> > am guessing the problem really needs to be solved by some sort of font
>> > substitution. Browsers apparantly are all doing it and perfectly on my
>> > machine since they show all chars without user needing to set fonts.
>>
>> I don't know how the browsers are doing it, perhaps they come with
>> predefined lists of fonts that are commonly installed on Windows to
>> cover different ranges.
>>
>> > i guess in emacs that is fontset? I'm not sure if it is just fontset,
>> > or emacs also calls the OS's font api to complete part of the
>> > display...
>>
>> Yes, in Emacs that is a fontset, and the difference between what
>> people are reporting is caused by the fact that the default fontset
>> defines rules that are based on information other than the font name
>> by default.  If you know what fonts best support different characters
>> on your system, I'd recommend redefining the default fontset to use
>> your preferred fonts using (set-fontset-font t ... ...). There are
>> many examples of using this function in lisp/international/fontset.el,
>> along with a list of scripts that Emacs recognizes as the third
>> argument (in script-representative-chars); another simple one below:
>>
>> (set-fontset-font t 'phonetic "Lucida Sans Unicode")
>
> Thanks. Spent a couple of hours reading about emacs fonts... am still
> pretty much nowhere.... agh emacs.

Not sure what exactly your problem is, but here are a couple of pointers:

To figure out what character ranges, fonts, etc I need, I use this site:

http://www.alanwood.net/unicode/fontsbyrange.html

Then you simply specify the font you want for specific characters (like
Jason wrote), e.g.

(set-fontset-font t 'cherokee
  (font-spec :family "MPH 2B Damase" :size 24))

Instead of the script name 'cherokee you can also use a range '(5024 .
5119) or '(#x13A0 . #x13FF) or specify the first and last character '(?Ꭰ
. ?᏿).

After you have done this for the most important characters you can use
something like

(set-fontset-font t nil (font-spec :family "Code2000") nil 'prepend)

Called with 'prepend, set-fontset-font will only affect characters that
had no font previously, so you can use Code2000 as a fallback.

If you want to use several fontsets or start from scratch, the easiest
way is to define a fontset

(create-fontset-from-fontset-spec
  "-*-DejaVu Sans Mono-medium-r-normal-*-14-*-*-*-*-*-fontset-mono")

This fontset will be called fontset-mono, so you would use

(set-fontset-font "fontset-mono" 'cherokee
  (font-spec :family "MPH 2B Damase" :size 24))

to modify it.

Hope that helps.



  
  
-- 
Florian Beck




  reply	other threads:[~2009-08-28 10:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25  6:20 getting unicode chars to show on Windows Xah Lee
2009-08-25 17:16 ` B. T. Raven
2009-08-25 18:31 ` Eli Zaretskii
2009-08-26  5:48   ` AW: " Christian.Strobl
2009-08-26  5:50   ` Christian.Strobl
     [not found] ` <mailman.5342.1251225106.2239.help-gnu-emacs@gnu.org>
2009-08-25 22:38   ` B. T. Raven
2009-08-25 22:42     ` B. T. Raven
2009-08-26  3:21     ` Eli Zaretskii
     [not found]     ` <mailman.5389.1251256888.2239.help-gnu-emacs@gnu.org>
2009-08-26 11:35       ` Xah Lee
2009-08-26 22:09         ` Jason Rumney
2009-08-27 18:36           ` Xah Lee
2009-08-28 10:40             ` Florian Beck [this message]
     [not found]             ` <mailman.5571.1251456046.2239.help-gnu-emacs@gnu.org>
2009-08-28 14:00               ` Xah Lee
2009-08-28 23:40                 ` Florian Beck
2009-08-29  0:20                 ` Drew Adams
     [not found]                 ` <mailman.5608.1251505221.2239.help-gnu-emacs@gnu.org>
2009-08-29 16:22                   ` Xah Lee
2009-08-30 17:38                     ` Jason Rumney
2009-08-31 15:23                     ` Drew Adams
2009-08-27  3:22         ` 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=87y6p48bmo.fsf@sophokles.streitblatt.de \
    --to=abstraktion@t-online.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@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.