unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Some question about fontsets
@ 2003-05-02 15:32 wang yin
  2003-05-03  2:47 ` Oliver Scholz
  0 siblings, 1 reply; 13+ messages in thread
From: wang yin @ 2003-05-02 15:32 UTC (permalink / raw)


Hi,

I asked question about fontsets a few days ago. But
I still have problem with the IPA characters [igzɑːmpl].

C-u C-x = gives the information:

  character: ɑ (01210721, 332241, 0x511d1)
    charset: mule-unicode-0100-24ff
	     (Unicode characters of the range U+0100..U+24FF.)
 code point: 35 81
     syntax: word
   category:
buffer code: 0x9C 0xF4 0xA3 0xD1
  file code: 0x9C 0xF4 0xA3 0xD1 (encoded by coding system emacs-mule-unix)
       font: -Adobe-Courier-Medium-R-Normal--14-140-75-75-M-90-ISO10646-1

I've read the Emacs manual about the fontsets, and set my fontset 
in ~/.Xdefaults as follows:

Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-wangyin,\
        chinese-gb2312:-*-simsun-medium-r-normal-*-24-*-gb2312*-*,\
	mule-unicode-0100-24ff:-b&h-*-*-r-*-*-14-*-*-*-*-*-iso10646-*

Emacs.Font: fontset-wangyin

But it still can't be displayed properly.
I use the describe-fontset function but I get the error:
"Current frame is using font, not fontset"

It seems none of my fontset settings can work!
I Shift-mouse1 to change the fontset, but nothing happens.

What's wrong? And how can I display the IPA characters?


-- 
Wang Yin
DA Lab, Tsinghua University,
100084
Beijing China

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-02 15:32 Some question about fontsets wang yin
@ 2003-05-03  2:47 ` Oliver Scholz
  2003-05-03  5:08   ` wang yin
  2003-05-21 20:37   ` Shane McAndrew
  0 siblings, 2 replies; 13+ messages in thread
From: Oliver Scholz @ 2003-05-03  2:47 UTC (permalink / raw)


wang yin <wy@wangyin.com> writes:
[...]
> C-u C-x = gives the information:
>
>   character: ɑ (01210721, 332241, 0x511d1)
>     charset: mule-unicode-0100-24ff
> 	     (Unicode characters of the range U+0100..U+24FF.)
>  code point: 35 81
>      syntax: word
>    category:
> buffer code: 0x9C 0xF4 0xA3 0xD1
>   file code: 0x9C 0xF4 0xA3 0xD1 (encoded by coding system emacs-mule-unix)
>        font: -Adobe-Courier-Medium-R-Normal--14-140-75-75-M-90-ISO10646-1
>
> I've read the Emacs manual about the fontsets, and set my fontset 
> in ~/.Xdefaults as follows:
>
> Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-wangyin,\
>         chinese-gb2312:-*-simsun-medium-r-normal-*-24-*-gb2312*-*,\
> 	mule-unicode-0100-24ff:-b&h-*-*-r-*-*-14-*-*-*-*-*-iso10646-*
>
> Emacs.Font: fontset-wangyin
>
> But it still can't be displayed properly.
> I use the describe-fontset function but I get the error:
> "Current frame is using font, not fontset"
[...]

Two notes:

1. I may be wrong, but I think that with the standard fonts under X
   it is not very likely that there is a b&h-font that covers the IPA
   characters. I suggest, that you try something like this, instead:

Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-wangyin,\
        chinese-gb2312:-*-simsun-medium-r-normal-*-24-*-gb2312*-*,\
	mule-unicode-0100-24ff:-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-iso10646-1

2. It seems that either this setting does not take effect or somewhere
   in your .emacs or somewhere else the default face is changed to
   "Adobe-Courier" again. To make sure, please post the output of 
   `M-x describe-face RET default RET' (the signifant line is 
   "Font or fontset: ...").

   Did you customize your default font? Or do you--per
   chance--override the setting you posted in you .Xdefaults again?
   You could also try to make sure that the settings take effect by
   invoking "xrdb ~/.Xdefaults" from an xterm and restarting Emacs.

    Oliver
-- 
14 Floréal an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-03  2:47 ` Oliver Scholz
@ 2003-05-03  5:08   ` wang yin
  2003-05-21 20:37   ` Shane McAndrew
  1 sibling, 0 replies; 13+ messages in thread
From: wang yin @ 2003-05-03  5:08 UTC (permalink / raw)


Ah! yes! my .emacs has a customize section that overrided the
.Xdefaults settings!

The problem is solve with these configurations:


Emacs.Font: fontset-wangyin
Emacs.FontsetList: wangyin courier(small)
Emacs.Fontset-0:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-wangyin,\
chinese-gb2312:-*-simsun-*-*-*--16-*-*-*-*-*-gb2312.1980-*,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1

Thank you very much!

^_^

-- 
Wang Yin
DA Lab, Tsinghua University,
100084
Beijing China

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-03  2:47 ` Oliver Scholz
  2003-05-03  5:08   ` wang yin
@ 2003-05-21 20:37   ` Shane McAndrew
  2003-05-22 10:37     ` Oliver Scholz
  1 sibling, 1 reply; 13+ messages in thread
From: Shane McAndrew @ 2003-05-21 20:37 UTC (permalink / raw)




Hi,

I have a similar problem -

When I run "dict" in eshell, the phonetic characters (IPA symbols)
don't display correctly. Here is the output -

~ $ dict exemple
1 definition found

>From French-English Freedict dictionary [fd-fra-eng]:

  exemple [ɛgzãpl]
       example

It also fails when run in xterm or gnome-terminal BUT it does display
correctly in uxterm (Xterm Unicode). Also, I can see the IPA character
set with the command "xfd -fn -etl-*-*-*". I am running Emacs 21.2.1
on Debian/GNU Linux testing distribution.

C-u C-x = reports the following on the first character after "exemple [" -

  character: É (04311, 2249, 0x8c9)
    charset: latin-iso8859-1
	     (Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100)
 code point: 73
     syntax: word
   category: l:Latin  
buffer code: 0x81 0xC9
  file code: not encodable by coding system nil
       font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1

and on the second character after "exemple [" -

  character: › (0233, 155, 0x9b)
    charset: eight-bit-control (8-bit control code (0x80..0x9F))
 code point: 155
     syntax: whitespace
   category:
buffer code: 0x9B
  file code: not encodable by coding system nil
       font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1g


I have tried creating a fontset, but the documentation wasn't very
clear to me. Could any give me examples or suggestions?


Shane

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-21 20:37   ` Shane McAndrew
@ 2003-05-22 10:37     ` Oliver Scholz
  2003-05-22 12:52       ` Wang Yin
  2003-05-22 15:03       ` Shane McAndrew
  0 siblings, 2 replies; 13+ messages in thread
From: Oliver Scholz @ 2003-05-22 10:37 UTC (permalink / raw)


Shane McAndrew <test1dellboy3@yahoo.co.uk> writes:
[...]
> When I run "dict" in eshell, the phonetic characters (IPA symbols)
> don't display correctly. Here is the output -
>
> ~ $ dict exemple
> 1 definition found
>
> From French-English Freedict dictionary [fd-fra-eng]:
>
>   exemple [É.gzaÌ.pl]
>        example
>
> It also fails when run in xterm or gnome-terminal BUT it does display
> correctly in uxterm (Xterm Unicode). Also, I can see the IPA character
> set with the command "xfd -fn -etl-*-*-*". I am running Emacs 21.2.1
> on Debian/GNU Linux testing distribution.
>
> C-u C-x = reports the following on the first character after "exemple [" -
>
>   character: É (04311, 2249, 0x8c9)
>     charset: latin-iso8859-1
[...]

[Thanks for sending the output of `C-u C-x =' in the first place.]

This is not a problem with fontsets, but with process encoding. Emacs
interprets the output of "dict" wrongly as encoded in latin 1. (You
may have to change the fontset, too, but let's solve the encoding
problem first.)

Does it work to put either

;; Affects the communication with the "dict" program everywhere in
;; Emacs.
(push '("dict" . utf-8-unix) process-coding-system-alist)

or

;; Affects only Eshell, but there it affects all communication with
;; sub-processes.
(add-hook 'eshell-mode-hook
	  (lambda ()
	    (set (make-local-variable 'default-process-coding-system)
		 '(utf-8-unix . utf-8-unix))))

into your .emacs?

If you happen to see hollow boxes now instead of garbage characters,
then we made progress and you have to change your fontset.

    Oliver
-- 
3 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-22 10:37     ` Oliver Scholz
@ 2003-05-22 12:52       ` Wang Yin
  2003-05-23  8:19         ` Oliver Scholz
  2003-05-22 15:03       ` Shane McAndrew
  1 sibling, 1 reply; 13+ messages in thread
From: Wang Yin @ 2003-05-22 12:52 UTC (permalink / raw)


Oh! Thank you. I've already solved this problem with a
fontset like this:

Emacs.Fontset-0:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-song,\
	chinese-gb2312:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
       	mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
	korean-ksc5601:-*-medium-r-normal-*-16-*-ksc5601*-*,
        chinese-cns11643-5:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
        chinese-cns11643-6:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
        chinese-cns11643-7:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0

If I add the code you give me. I get:

Example \Ex*am"ple\, v. t. [imp. & p. p. Exampled; p. pr. &
   vb. n. Exampling.]
   To set an example for; to give a precedent for; to exemplify;
   to give an instance of; to instance. [Obs.] ``I may example
   my digression by some mighty precedent.'' --Shak.
   [1913 Webster]

The IPA characters changed into ascii.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-22 10:37     ` Oliver Scholz
  2003-05-22 12:52       ` Wang Yin
@ 2003-05-22 15:03       ` Shane McAndrew
  2003-05-23  8:15         ` Oliver Scholz
  1 sibling, 1 reply; 13+ messages in thread
From: Shane McAndrew @ 2003-05-22 15:03 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> ;; Affects the communication with the "dict" program everywhere in
> ;; Emacs.
> (push '("dict" . utf-8-unix) process-coding-system-alist)

Yes, that worked - now I see the hollow boxes -

/home/sss/mydocs $ dict exemple
1 definition found

>From French-English Freedict dictionary [fd-fra-eng]:

  exemple [ɛgzãpl]
       example


C-u C-x = shows the following -

  character: ̃ (01211303, 332483, 0x512c3)
    charset: mule-unicode-0100-24ff
	     (Unicode characters of the range U+0100..U+24FF.)
 code point: 37 67
     syntax: word
   category:
buffer code: 0x9C 0xF4 0xA5 0xC3
  file code: 0x9C 0xF4 0xA5 0xC3 (encoded by coding system emacs-mule)
       font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1

I tried to create a fontset with the following in ~/.Xdefaults

Emacs.Fontset-0: -Adobe-Courier-Medium-R-Normal-*-17-*-*-*-*-*-\
fontset-courier(17), mule-unicode-0100-24ff:-Misc-Fixed-Medium-R-\
Normal--17-120-100-100-M-100-ISO10646-1
Emacs.Font: fontset-courier(17)

Next, I logged out and back in to X11, ran M-x eshell, shift
mouse-2 but I didn't see my fontset in the list. I only saw "default"
and "standard: 16 dot medium".

Any clues?

Shane

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-22 15:03       ` Shane McAndrew
@ 2003-05-23  8:15         ` Oliver Scholz
  2003-05-23 10:53           ` Shane McAndrew
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Scholz @ 2003-05-23  8:15 UTC (permalink / raw)


Shane McAndrew <test1dellboy3@yahoo.co.uk> writes:
[...]

> I tried to create a fontset with the following in ~/.Xdefaults
>
> Emacs.Fontset-0: -Adobe-Courier-Medium-R-Normal-*-17-*-*-*-*-*-\
> fontset-courier(17), mule-unicode-0100-24ff:-Misc-Fixed-Medium-R-\
> Normal--17-120-100-100-M-100-ISO10646-1
> Emacs.Font: fontset-courier(17)
>
> Next, I logged out and back in to X11, ran M-x eshell, shift
> mouse-2 but I didn't see my fontset in the list. I only saw "default"
> and "standard: 16 dot medium".
>
> Any clues?

I have not found the time to look where exactly in you specification
an error is. Please try this in you .Xdefaults, it should work (on
XFree 4):

Emacs.Fontset-0:-adobe-courier-medium-r-*-*-17-*-*-*-*-*-fontset-shane,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal-*-17-*-*-*-*-*-iso10646-1

Emacs.Font: fontset-shane


    Oliver
-- 
4 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-22 12:52       ` Wang Yin
@ 2003-05-23  8:19         ` Oliver Scholz
  0 siblings, 0 replies; 13+ messages in thread
From: Oliver Scholz @ 2003-05-23  8:19 UTC (permalink / raw)


Wang Yin <wang-y01@mails.tsinghua.edu.cn> writes:

> Oh! Thank you. I've already solved this problem with a
> fontset like this:
>
[...]
>
> If I add the code you give me. I get:
>
> Example \Ex*am"ple\, v. t. [imp. & p. p. Exampled; p. pr. &
>    vb. n. Exampling.]
>    To set an example for; to give a precedent for; to exemplify;
>    to give an instance of; to instance. [Obs.] ``I may example
>    my digression by some mighty precedent.'' --Shak.
>    [1913 Webster]
>
> The IPA characters changed into ascii.

Erm, did you have the same problem like Shane with the same symptoms?
Is this the output of dict in an eshell? Was it something different
before? 

(The reason why I ask this latter question is, that there is no
functionality to replace IPA characters with an ASCII
representation. At least no one that I am aware of. So I suspect that
dict sends ASCII to Emacs in the first place on your system. But most
important: please tell me a bit more about the circumstances.)

    Oliver
-- 
4 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-23  8:15         ` Oliver Scholz
@ 2003-05-23 10:53           ` Shane McAndrew
  2003-05-23 11:15             ` Oliver Scholz
  0 siblings, 1 reply; 13+ messages in thread
From: Shane McAndrew @ 2003-05-23 10:53 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:
> 
> I have not found the time to look where exactly in you specification
> an error is. Please try this in you .Xdefaults, it should work (on
> XFree 4):
> 
> Emacs.Fontset-0:-adobe-courier-medium-r-*-*-17-*-*-*-*-*-fontset-shane,\
> mule-unicode-0100-24ff:-misc-fixed-medium-r-normal-*-17-*-*-*-*-*-iso10646-1
> 
> Emacs.Font: fontset-shane

Oliver, thanks for your continuing efforts to help me! I tried your
suggestion in my .Xdefaults, but I still get empty squares in the
output of dict -

~ $ dict exemple
1 definition found

>From French-English Freedict dictionary [fd-fra-eng]:

  exemple [ɛgzãpl]
       example

C-u C-x = gives the following for the two empty squares -

  character: ɛ (01210733, 332251, 0x511db)
    charset: mule-unicode-0100-24ff
	     (Unicode characters of the range U+0100..U+24FF.)
 code point: 35 91
     syntax: word
   category:
buffer code: 0x9C 0xF4 0xA3 0xDB
  file code: not encodable by coding system nil
       font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1

  character: ̃ (01211303, 332483, 0x512c3)
    charset: mule-unicode-0100-24ff
	     (Unicode characters of the range U+0100..U+24FF.)
 code point: 37 67
     syntax: word
   category:
buffer code: 0x9C 0xF4 0xA5 0xC3
  file code: not encodable by coding system nil
       font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1


further information -

process-coding-system-alist's value is 
(("dict" . utf-8-unix))

...any ideas?

Shane

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-23 10:53           ` Shane McAndrew
@ 2003-05-23 11:15             ` Oliver Scholz
  2003-05-23 14:41               ` Shane McAndrew
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Scholz @ 2003-05-23 11:15 UTC (permalink / raw)


Shane McAndrew <test1dellboy3@yahoo.co.uk> writes:

[...]
> Oliver, thanks for your continuing efforts to help me! I tried your
> suggestion in my .Xdefaults, but I still get empty squares in the
> output of dict -

[...]
> C-u C-x = gives the following for the two empty squares -
>
>   character: ɛ (01210733, 332251, 0x511db)
>     charset: mule-unicode-0100-24ff
> 	     (Unicode characters of the range U+0100..U+24FF.)
[...]
>        font: -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1
[...]

This looks as if your specification of the fontset does not take
effect. Please type `M-x describe-face RET default RET'. What does
the output say in the line "Font or fontset: ..."?

If you type `M-x describe-fontset RET', does Emacs offer you your
fontset ("fontset-shane") for completion? If so, then at least your
changes to .Xdefault took effect. If not, please type 
"xrdb ~/.Xdefaults" at an xterm (or what ever shell you use under X)
and start Emacs again.

Are you per chance overriding your settings somewhere? For example
have you customized your default face? Or did you set it in your
.emacs? Is there nothing else in .Xdefaults concerning fonts in Emacs?

    Oliver
-- 
4 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-23 11:15             ` Oliver Scholz
@ 2003-05-23 14:41               ` Shane McAndrew
  2003-05-23 15:18                 ` Oliver Scholz
  0 siblings, 1 reply; 13+ messages in thread
From: Shane McAndrew @ 2003-05-23 14:41 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> If you type `M-x describe-fontset RET', does Emacs offer you your
> fontset ("fontset-shane") for completion? If so, then at least your
> changes to .Xdefault took effect. If not, please type 
> "xrdb ~/.Xdefaults" at an xterm (or what ever shell you use under X)
> and start Emacs again.

xrdb ~/.Xdefaults partially fixed the problem. I had assumed that
logging out then back in to X11 effectly did the same thing, but
apparently not!

Now I see the phonetic characters like this -

(back-to-front 3), "g", "z", "a", ("~" in superscript position), "p", "l"

That's ok, except the "a" and ("~" in superscript position) shoud be
displayed as a single character. This represents the French nasal
vowel "an" as in "banque". There is a similar problem with the other
nasal vowels. However, uxterm (unicode xterm) manages to diplay as
single characters.

Thanks again
Shane

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Some question about fontsets
  2003-05-23 14:41               ` Shane McAndrew
@ 2003-05-23 15:18                 ` Oliver Scholz
  0 siblings, 0 replies; 13+ messages in thread
From: Oliver Scholz @ 2003-05-23 15:18 UTC (permalink / raw)


Shane McAndrew <test1dellboy3@yahoo.co.uk> writes:
[...]
> That's ok, except the "a" and ("~" in superscript position) shoud be
> displayed as a single character. 
[...]

You are out of luck here, I am afraid. As far as I know Emacs is not
yet able to deal with combining diacritical marks. :-(

Unless you can configure dict to send characters with precombined
diacritics[1], I don't know of any way to deal with this.

    Oliver

Footnotes: 
[1] For example by using U+00E3 (ã) instead of U+0060 (a) + U+0303
(~).

-- 
4 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-05-23 15:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-02 15:32 Some question about fontsets wang yin
2003-05-03  2:47 ` Oliver Scholz
2003-05-03  5:08   ` wang yin
2003-05-21 20:37   ` Shane McAndrew
2003-05-22 10:37     ` Oliver Scholz
2003-05-22 12:52       ` Wang Yin
2003-05-23  8:19         ` Oliver Scholz
2003-05-22 15:03       ` Shane McAndrew
2003-05-23  8:15         ` Oliver Scholz
2003-05-23 10:53           ` Shane McAndrew
2003-05-23 11:15             ` Oliver Scholz
2003-05-23 14:41               ` Shane McAndrew
2003-05-23 15:18                 ` Oliver Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).