Re: Using fontsets in emacs
OK I answered my own question. I decided to hack on the emacs lisp some
more... Instead of hacking on the core emacs files I added commands to
my ~/.emacs file.
Basically I wanted to use the -*-kai-*- font for viewing big5
characters. I also wanted it in three different sizes (the fonts are so
beautiful you want to see them big).
I ended up creating three fontsets I could choose from when I hold down
"shift+mouse1" . Also you can see your fontset list with "M-x
list-fontsets" .
Here's what I added to my ~/.emacs file to get the three new fontsets.
;;5/17/01
;; my standard fontset
(defvar my-fontset-spec)
(setq my-fontset-spec
"-*-fixed-medium-r-normal-*-15-*-*-*-*-*-fontset-normal,
chinese-big5-1:*-kai-*-*-15-*,
chinese-big5-2:*-kai-*-*-15-*"
)
(create-fontset-from-fontset-spec my-fontset-spec )
;; Chinese fontsets
(defvar big5-40-fontset-spec)
(setq big5-40-fontset-spec
"-*-fixed-medium-r-normal-*-40-*-*-*-*-*-fontset-big5.40,
chinese-big5-1:*-kai-*-*-40-*,
chinese-big5-2:*-kai-*-*-40-*"
)
(create-fontset-from-fontset-spec big5-40-fontset-spec )
(defvar big5-20-fontset-spec)
(setq big5-20-fontset-spec
"-*-fixed-medium-r-normal-*-20-*-*-*-*-*-fontset-big5.20,
chinese-big5-1:*-kai-*-*-20-*,
chinese-big5-2:*-kai-*-*-20-*"
)
(create-fontset-from-fontset-spec big5-20-fontset-spec )
Curtis Brune wrote:
>
> Hi,
>
> I trying to customize my fontsets in emacs for the chinese-Big5
> character set. I know I can use the "standard" fontset by holding down
> "shift+mouse1" and I have. It works great! But I want to change the
> the font....
>
> I've read the emacs info pages about fontsets. It boils down to setting
> Xresouces in the .Xdefault file. I'm trying the following in my
> .Xdefaults wihtout success:
>
> Emacs.Fontset-0: *-fixed-medium-*-15-*-fontset-24, \
> chinese-big5-1:*-kai-*-*-15-*, \
> chinese-big5-2:*-kai-*-*-15-*
>
> It **should** create a fontset called "*-fixed-medium-*-15-*-fontset",
> but I can't get it to work. Any .Xdefault wizards out there? or emacs
> lisp wizards?
>
> Also there is also a function called "create-fontset-from-fontset-spec"
> in the documentation, but I can't get it to work for me. I'm running
> woody with emacs 20.7 .
>
> I was able to actually hack
> /usr/share/emacs/20.7/lisp/international/fontset.el and modify the
> "standard-fontset-spec" variable to be what I wanted -- that actually
> worked, but that can't be the right way to do it :) . That made the
> usual "shift+mouse1" standard fontset be what I wanted.
>
> Cheers,
> Curt
--
| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.
Reply to: