all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using different fonts depending on character set
@ 2004-08-10 19:59 Paul Moore
  2004-08-11  9:02 ` Oliver Scholz
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Moore @ 2004-08-10 19:59 UTC (permalink / raw)


Emacs 21.3 on Windows, No Gnus from CVS. For 99.99% of my email/news I
get ASCII (or maybe latin-1) text, and I use the default Courier New
font. However, just occasionally, I get messages with odd characters -
often encoded in UTF-8, not always using characters available in
Courier New. For example, I recently saw a message with a short piece
of Japanese text - the rest was basically ASCII.

Is there a way to set a different font which can be used for such "out
of range" characters? I'd have though not, and yet my email at work
(Outlook - ack, spit) managed to switch fonts just for the Japanese
message (it switched for the whole message, not just for the Japanese
characters, but that's OK).

This is a very minor issue (after all, it's extremely rare that I get
mail like this, other than spam) but it's a matter of pride - I don't
like to think that Outlook can do something that Gnus can't!

I suspect this is more of an Emacs question than a Gnus one, hence the
crosspost. Does anyone have any suggestions?

Thanks,
Paul.
-- 
A little inaccuracy sometimes saves tons of explanation -- Saki

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

* Re: Using different fonts depending on character set
  2004-08-10 19:59 Using different fonts depending on character set Paul Moore
@ 2004-08-11  9:02 ` Oliver Scholz
  2004-08-11 21:32   ` Paul Moore
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Scholz @ 2004-08-11  9:02 UTC (permalink / raw)


Paul Moore <pf_moore@yahoo.co.uk> writes:

> Emacs 21.3 on Windows, No Gnus from CVS. For 99.99% of my email/news I
> get ASCII (or maybe latin-1) text, and I use the default Courier New
> font. However, just occasionally, I get messages with odd characters -
> often encoded in UTF-8, not always using characters available in
> Courier New. For example, I recently saw a message with a short piece
> of Japanese text - the rest was basically ASCII.
>
> Is there a way to set a different font which can be used for such "out
> of range" characters? I'd have though not, and yet my email at work
> (Outlook - ack, spit) managed to switch fonts just for the Japanese
> message (it switched for the whole message, not just for the Japanese
> characters, but that's OK).
>
> This is a very minor issue (after all, it's extremely rare that I get
> mail like this, other than spam) but it's a matter of pride - I don't
> like to think that Outlook can do something that Gnus can't!
[...]

It is as you suspect: you can define different fonts for
different character sets. A collection of fonts and
specifications for which characters to use that font is called
a "fontset". For instance, this would adjust the
fontset "fontset-standard" to use "palatino linotype"
(on MS Windows XP) for a certain range of UCS characters:

(set-fontset-font "fontset-standard"
                  'mule-unicode-0100-24ff
                  "-*-palatino linotype-*-*-r-*-14-*-*-*-*-*-iso10646-1")

;; Use "fontset-standard"
(set-face-font 'default "fontset-standard")

You can find out to which charset a character in a buffer belongs by
hitting `C-u C-x =' with point before that character.

See also:
(info "(emacs)Defining Fontsets")

Does that help?

> I suspect this is more of an Emacs question than a Gnus one, hence the
> crosspost. Does anyone have any suggestions?

It is an Emacs question, follow-up set accordingly to gnu.emacs.help.

    Oliver
-- 
25 Thermidor an 212 de la Révolution
Liberté, Egalité, Fraternité!

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

* Re: Using different fonts depending on character set
  2004-08-11  9:02 ` Oliver Scholz
@ 2004-08-11 21:32   ` Paul Moore
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Moore @ 2004-08-11 21:32 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> It is as you suspect: you can define different fonts for
> different character sets. A collection of fonts and
> specifications for which characters to use that font is called
> a "fontset".

[...]

> See also:
> (info "(emacs)Defining Fontsets")
>
> Does that help?

It does indeed. Thank you very much for the pointer.

Regards,
Paul.
-- 
"Bother," said the Borg, "We've assimilated Pooh."

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

end of thread, other threads:[~2004-08-11 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-10 19:59 Using different fonts depending on character set Paul Moore
2004-08-11  9:02 ` Oliver Scholz
2004-08-11 21:32   ` Paul Moore

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.