help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting unicode chars to show on Windows


From: Xah Lee
Subject: Re: getting unicode chars to show on Windows
Date: Fri, 28 Aug 2009 07:00:57 -0700 (PDT)
User-agent: G2/1.0

Hi Florian,

thank for your info. I'll need to study it more... getting any unicode
char to display ... also wished to understand emacs fontset in some
detail, so am a bit slow and taking it easy. There are several posts
on this font issue recently... i think Peter? posted a fonset code
that supposed to make all unicode display... (saved to be studied
later) A complication with emacs/fonts is that different OS comes with
different sets of fonts, and for particular platform emacs also deals
font differently ...

Though, right now there's this one thing i need. How do i set a font
for the current frame?
What i want is a toggle-font code so that i can press a key and have
the font set to either a monospaced or variable-spaced one, and just
for the current frame. More specifically:

• what's the elisp function that makes the current frame use Courier
New? (i'll also need to know the full string or whatever that emacs
uses for what Windows calls the Courier New font.)

Thanks.

 Xah

On Aug 28, 3:40 am, Florian Beck <abstrakt...@t-online.de> wrote:
> > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]