unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Setting font to Lucida Grande on Mac OS X
@ 2003-09-14 22:43 Sancho Neves-Graca
  2003-09-14 23:10 ` Luc Teirlinck
  2003-09-15  5:55 ` Andrew Choi
  0 siblings, 2 replies; 34+ messages in thread
From: Sancho Neves-Graca @ 2003-09-14 22:43 UTC (permalink / raw)


I am running Emacs 21.3.50 Carbon Mac OS X 10.2.6.

I would like to change the font of a frame from the default (Monaco) to 
the system default (Lucida Grande). For other fonts which are named by 
a single word the following commands work:

M-x set-frame-font RET -*-Monaco-*-120-*
M-x set-frame-font RET -*-Courier-*-120-*
M-x set-frame-font RET -*-Helvetica-*-120-*

But the command

M-x set-frame-font RET -*-LucidaGrande-*-120-*

returns Font '-*-LucidaGrande-*-120-*' is not defined.

What is the name known to Emacs for Lucida Grande? If a space is 
needed, how is it entered (pressing Space returns [No Match])?

Further, what entry in ~/.MacOSX/environment.plist is necessary to set 
this new font as the default for any new frame?

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

* Setting font to Lucida Grande on Mac OS X
@ 2003-09-14 23:09 Sancho Neves-Graca
  2003-09-14 23:51 ` Luc Teirlinck
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: Sancho Neves-Graca @ 2003-09-14 23:09 UTC (permalink / raw)


I am running Emacs 21.3.50 Carbon Mac OS X 10.2.6.

I would like to change the font of a frame from the default (Monaco) to 
the system default (Lucida Grande). The following fonts can be set:

M-x set-frame-font RET -*-Monaco-*-120-*
M-x set-frame-font RET -*-Courier-*-120-*
M-x set-frame-font RET -*-Helvetica-*-120-*

But putting in ~/.emacs

(set-default-font "-*-Lucida Grande-*-120-*")

returns Font '-*-Lucida Grande-*-120-*' is not defined.

Is Lucida Grande available for Emacs on Mac OS X? If so, what is its 
identifier?

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 22:43 Setting font to Lucida Grande on Mac OS X Sancho Neves-Graca
@ 2003-09-14 23:10 ` Luc Teirlinck
  2003-09-15  5:55 ` Andrew Choi
  1 sibling, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-14 23:10 UTC (permalink / raw)
  Cc: emacs-devel

Sancho Neves-Graca wrote:

   What is the name known to Emacs for Lucida Grande? If a space is 
   needed, how is it entered (pressing Space returns [No Match])?

I can answer the second part of the question: C-q then space.
I would guess that this will just tell you that the font is not
defined, but you can always try.

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 23:09 Sancho Neves-Graca
@ 2003-09-14 23:51 ` Luc Teirlinck
  2003-09-14 23:55 ` Luc Teirlinck
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-14 23:51 UTC (permalink / raw)
  Cc: emacs-devel

Sancho Neves-Graca wrote:

   But putting in ~/.emacs

   (set-default-font "-*-Lucida Grande-*-120-*")

   returns Font '-*-Lucida Grande-*-120-*' is not defined.

   Is Lucida Grande available for Emacs on Mac OS X? If so, what is its 
   identifier?

Are you _sure_ that there _is_ a font '-*-Lucida Grande-*-120-*' on
your system?  The C-q trick worked perfectly for me.  I do not have
Lucida Grande on my system, but I successfully tried 
M-x set-frame-font <RET> -*-century schoolbook-* (with C-q <SPC>).

I use GNU/Linux and do not know whether you can run `xlsfonts' on Mac
OS X.  If you can, try:

xlsfonts -fn '-*-Lucida Grande-*'

You said that 'Lucida Grande' was the system default, but what about
the '-120' part?  Is that the system default too?  Is it available?

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 23:09 Sancho Neves-Graca
  2003-09-14 23:51 ` Luc Teirlinck
@ 2003-09-14 23:55 ` Luc Teirlinck
  2003-09-15  4:10 ` Luc Teirlinck
  2003-09-15  4:47 ` Luc Teirlinck
  3 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-14 23:55 UTC (permalink / raw)
  Cc: emacs-devel

To follow up on my last reply:

[bash2.05b.0 ~ 3 6] xlsfonts -fn '-*-century schoolbook-*'
-abisource-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-regular-i-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-regular-r-normal--0-0-0-0-p-0-iso8859-1
[bash2.05b.0 ~ 3 7] xlsfonts -fn '-*-century schoolbook-*-120-*'
xlsfonts: pattern "-*-century schoolbook-*-120-*" unmatched
[bash2.05b.0 ~ 3 8] 

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 23:09 Sancho Neves-Graca
  2003-09-14 23:51 ` Luc Teirlinck
  2003-09-14 23:55 ` Luc Teirlinck
@ 2003-09-15  4:10 ` Luc Teirlinck
  2003-09-15  4:34   ` Luc Teirlinck
  2003-09-15  4:47 ` Luc Teirlinck
  3 siblings, 1 reply; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-15  4:10 UTC (permalink / raw)
  Cc: emacs-devel

Sancho Neves-Graca wrote:

   But putting in ~/.emacs

   (set-default-font "-*-Lucida Grande-*-120-*")

   returns Font '-*-Lucida Grande-*-120-*' is not defined.

   Is Lucida Grande available for Emacs on Mac OS X? If so, what is its 
   identifier?

The actual answer to this may be a little bit more complicated than I
thought at first.

As I already said, I do not have Lucida Grande, but I believe the
situation must be very similar to `century schoolbook'.

>From one of my previous messages:

[bash2.05b.0 ~ 3 6] xlsfonts -fn '-*-century schoolbook-*'
-abisource-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-regular-i-normal--0-0-0-0-p-0-iso8859-1
-abisource-century schoolbook-regular-r-normal--0-0-0-0-p-0-iso8859-1
[bash2.05b.0 ~ 3 7] xlsfonts -fn '-*-century schoolbook-*-120-*'
xlsfonts: pattern "-*-century schoolbook-*-120-*" unmatched
[bash2.05b.0 ~ 3 8]

Take the first entry xlsfonts found:

-abisource-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1

I figured out using `xfd' (may or may not be available on Mac OS X)
that this font is identical with:

'-abisource-century schoolbook-regular-r-normal--17-120-100-100-p-94-iso8859-1'

`emacs-21.3.50 -fn' works perfectly with the last expression.

However, if you put *'s in the wrong places in the last expression,
in particular '-*-century schoolbook-*-120-*', neither 

emacs-21.3.50 -fn 'stuff-with-*'s'

nor

xlsfonts -fn 'stuff-with-*'s'

believe there is _any_ matching font.

I believe this has something to do with the following quote from the
xlsfonts man page:

       -o      This option indicates that xlsfonts should  do  an
               OpenFont  (and  QueryFont,  if appropriate) rather
               than a ListFonts.  This is useful if ListFonts  or
               ListFontsWithInfo fail to list a known font (as is
               the case with some scaled font systems).

The -o option does not help in this case, however, still no matches.

As xlsfonts can not handle this either, I do not believe that this is
a bug in Emacs, but I am not a real expert in these matters.

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-15  4:10 ` Luc Teirlinck
@ 2003-09-15  4:34   ` Luc Teirlinck
  0 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-15  4:34 UTC (permalink / raw)
  Cc: sancho, emacs-devel

>From my previous message:

   Take the first entry xlsfonts found:

   -abisource-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1

Actually, I was talking about the last entry found:

-abisource-century schoolbook-regular-r-normal--0-0-0-0-p-0-iso8859-1

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 23:09 Sancho Neves-Graca
                   ` (2 preceding siblings ...)
  2003-09-15  4:10 ` Luc Teirlinck
@ 2003-09-15  4:47 ` Luc Teirlinck
  3 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-15  4:47 UTC (permalink / raw)
  Cc: emacs-devel

Sancho Neves-Graca wrote:

   But putting in ~/.emacs

   (set-default-font "-*-Lucida Grande-*-120-*")

   returns Font '-*-Lucida Grande-*-120-*' is not defined.

   Is Lucida Grande available for Emacs on Mac OS X? If so, what is its 
   identifier?

What happens if you try:

emacs-21.3.50 -fn '-*-Lucida Grande-regular-r-normal--*-120-*-*-*-*-*-*'

(Worked for `century schoolbook'.)

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-14 22:43 Setting font to Lucida Grande on Mac OS X Sancho Neves-Graca
  2003-09-14 23:10 ` Luc Teirlinck
@ 2003-09-15  5:55 ` Andrew Choi
  2003-09-15 15:09   ` Luc Teirlinck
  1 sibling, 1 reply; 34+ messages in thread
From: Andrew Choi @ 2003-09-15  5:55 UTC (permalink / raw)


Sancho Neves-Graca <sancho@neves-graca.org> writes:

> I would like to change the font of a frame from the default (Monaco)
> to the system default (Lucida Grande).  [...]
>
> M-x set-frame-font RET -*-LucidaGrande-*-120-*

1. Please use gnu.emacs.help to ask user questions.

2. I don't recommend using truetype fonts that do not contain fixed-size
   variants because the Mac emulation code for these fonts isn't
   complete (since we're on a developers list, I invite everyone to work
   on it), but if you must, do something like this:

M-x set-frame-font RET -apple-lucida grande-medium-r-normal--12-0-75-75-m-0-mac-roman

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-15  5:55 ` Andrew Choi
@ 2003-09-15 15:09   ` Luc Teirlinck
  2003-09-16  1:19     ` Sancho Neves-Graca
  2003-09-16  3:54     ` Stephen J. Turnbull
  0 siblings, 2 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-15 15:09 UTC (permalink / raw)
  Cc: emacs-devel

Andrew Choi wrote:

   do something like this:

   M-x set-frame-font RET -apple-lucida grande-medium-r-normal--12-0-75-75-m-0-mac-roman

I guess that gets rid of Sancho's concrete problem, but it does not
answer the following question:

Why does

M-x set-frame-font RET -*-Courier-*-120-*

work and

M-x set-frame-font RET -*-Lucida Grande-*-120-*

not?

Maybe `-*-Lucida Grande-*-120-*' really is unmatched (I can not
check), but look at the example below.

The difference between a user question belonging on `gnu.emacs.help'
and a question belonging on this site is that the answer to the former
could have been found in the standard documentation, in this case the
Emacs manual.

>From (emacs)Font X :

    You can use wildcard patterns for the font name; then Emacs lets X
    choose one of the fonts that match the pattern.

Not quite.  Emacs (or X) will not be able to find some fonts this way.
Neither will xlsfonts.  I guess that if I were an expert on fonts, the
example below would be obvious to me, but I believe that being an
expert on fonts should not be a prerequisite to being able to specify
a font for Emacs.

[bash2.05b.0 ~ 3 1] emacs-21.3.50 -fn
'-abisource-courier-bold-i-normal--17-120-*-*-*-*-*' 
No fonts match `-abisource-courier-bold-i-normal--17-120-*-*-*-*-*'
[bash2.05b.0 ~ 3 2] emacs-21.3.50 -fn
'-abisource-courier-bold-i-normal--17-120-*-*-*-*-*-*'
[bash2.05b.0 ~ 3 3] 

Why does the second line work and the first one not?  Does `*' not
match `*-*' anyway?  It does for `-*-Courier-*-120-*'.

Is it possible to tell in one or two lines in (emacs)Font X what is
going on here?  Or am I missing something truly obvious (even to non
font experts)?

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-15 15:09   ` Luc Teirlinck
@ 2003-09-16  1:19     ` Sancho Neves-Graca
  2003-09-16  3:54     ` Stephen J. Turnbull
  1 sibling, 0 replies; 34+ messages in thread
From: Sancho Neves-Graca @ 2003-09-16  1:19 UTC (permalink / raw)


Thanks to Luc and Andrew for their replies. My posting fell somewhere 
between a user problem and a development issue. From the point of view 
of a user, he would check on the documentation for how to set a desired 
font on a frame, namely the font used by his operating system per 
default. But as soon as it is apparent that Emacs does not seem to know 
about such font, it does become a development question. Andrew 
clarified that the Carbon implementation of Emacs does not directly 
make use of the native TrueType font. Thus fonts kept in 
/System/Library/Fonts are not directly used by Emacs. There does seem 
to me to be a scarce availablity of fonts for the Emacs Carbon 
implementation. The default font (Monaco) is in my opinion hard on the 
eyes either for source code or XML editing, because the vertical to 
horizontal ratio of a letter box is too high. Contrast that with the 
default font setting of Project Builder (Lucida Grande Regular 11 pt), 
where the letters are much more well-rounded and pleasing to the eye. 
One working solution is to use good old Courier ("-*-Courier-*-140-*"). 
I have now built Emacs on Mac OS X using X11 and the offered fonts are 
others than those that can be set with the Carbon implementation and 
again Courier looks the best compromise. Perhaps with the X11 build new 
fonts for Emacs can more readily be installed.

On Monday, September 15, 2003, at 05:09 PM, Luc Teirlinck wrote:

> Andrew Choi wrote:
>
>    do something like this:
>
>    M-x set-frame-font RET -apple-lucida 
> grande-medium-r-normal--12-0-75-75-m-0-mac-roman
>
> I guess that gets rid of Sancho's concrete problem, but it does not
> answer the following question:
>
> Why does
>
> M-x set-frame-font RET -*-Courier-*-120-*
>
> work and
>
> M-x set-frame-font RET -*-Lucida Grande-*-120-*
>
> not?
>
> Maybe `-*-Lucida Grande-*-120-*' really is unmatched (I can not
> check), but look at the example below.
>
> The difference between a user question belonging on `gnu.emacs.help'
> and a question belonging on this site is that the answer to the former
> could have been found in the standard documentation, in this case the
> Emacs manual.
>
>> From (emacs)Font X :
>
>     You can use wildcard patterns for the font name; then Emacs lets X
>     choose one of the fonts that match the pattern.
>
> Not quite.  Emacs (or X) will not be able to find some fonts this way.
> Neither will xlsfonts.  I guess that if I were an expert on fonts, the
> example below would be obvious to me, but I believe that being an
> expert on fonts should not be a prerequisite to being able to specify
> a font for Emacs.
>
> [bash2.05b.0 ~ 3 1] emacs-21.3.50 -fn
> '-abisource-courier-bold-i-normal--17-120-*-*-*-*-*'
> No fonts match `-abisource-courier-bold-i-normal--17-120-*-*-*-*-*'
> [bash2.05b.0 ~ 3 2] emacs-21.3.50 -fn
> '-abisource-courier-bold-i-normal--17-120-*-*-*-*-*-*'
> [bash2.05b.0 ~ 3 3]
>
> Why does the second line work and the first one not?  Does `*' not
> match `*-*' anyway?  It does for `-*-Courier-*-120-*'.
>
> Is it possible to tell in one or two lines in (emacs)Font X what is
> going on here?  Or am I missing something truly obvious (even to non
> font experts)?
>
> Sincerely,
>
> Luc.
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel
>

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-15 15:09   ` Luc Teirlinck
  2003-09-16  1:19     ` Sancho Neves-Graca
@ 2003-09-16  3:54     ` Stephen J. Turnbull
  2003-09-17  2:34       ` Luc Teirlinck
  1 sibling, 1 reply; 34+ messages in thread
From: Stephen J. Turnbull @ 2003-09-16  3:54 UTC (permalink / raw)
  Cc: akochoi, emacs-devel

>>>>> "Luc" == Luc Teirlinck <teirllm@dms.auburn.edu> writes:

    Luc> Maybe `-*-Lucida Grande-*-120-*' really is unmatched (I can
    Luc> not check), but look at the example below.

I believe this is probably a bug in the relevant Xlib or server
routines.  The problem is mostly like due to the fact that '*' can
match any number of characters, and does not respect field
boundaries.  Furthermore, the standard is not terribly specific about
how to deal with target font names which are themselves wildcards (ie,
scalable, with 0 for all dimensions.

If you want to have a reasonably good expectation of getting a match,
use a fully qualified XLFD.  xfontsel is a convenient way to produce
these.  The technical definition is more complex, but you'll hardly
ever go wrong if you think of "fully qualified XLFD" as "containing
exactly 14 hyphens, and starting with a hyphen".

Especially in a world where we (at least sometimes) ask Windows and
Mac users to specify XLFDs for their fonts, I think this should be in
the Emacs manual.

On '-abisource-courier-bold-i-normal--17-120-*-*-*-*-*' 
vs. '-abisource-courier-bold-i-normal--17-120-*-*-*-*-*-*':

    Luc> Why does the second line work and the first one not?  Does
    Luc> `*' not match `*-*' anyway?  It does for
    Luc> `-*-Courier-*-120-*'.

Experience shows that different implementations of X11 do different
things given the same set of fonts and the same specs.  So you may as
well just chalk it up to "implementation dependent, and therefore
potentially random, behavior".  Use the 14-hyphen XLFD.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-16  3:54     ` Stephen J. Turnbull
@ 2003-09-17  2:34       ` Luc Teirlinck
  2003-09-17 12:23         ` Stephen J. Turnbull
  2003-09-18 11:05         ` Richard Stallman
  0 siblings, 2 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-17  2:34 UTC (permalink / raw)
  Cc: akochoi, emacs-devel

Stephen J. Turnbull wrote:

   If you want to have a reasonably good expectation of getting a match,
   use a fully qualified XLFD.  xfontsel is a convenient way to produce
   these.  The technical definition is more complex, but you'll hardly
   ever go wrong if you think of "fully qualified XLFD" as "containing
   exactly 14 hyphens, and starting with a hyphen".

   Especially in a world where we (at least sometimes) ask Windows and
   Mac users to specify XLFDs for their fonts, I think this should be in
   the Emacs manual.

What about the following patch?  I could commit it if desired.
I also replaced the `eleven' in:

    Under X, each font has a long name which consists of eleven words or
    numbers, separated by dashes.

by `fourteen', because this seems like an obvious error.  An XLFD
contains fourteen fields, even though one of these is usually empty.

===File ~/cmdargs-diff======================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Tue Sep 16 21:21:54 2003
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 706,723 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind
! of name.  You can use wildcard patterns for the font name; then Emacs
! lets X choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  (Theoretically, this
! includes dashes.  In practice however, this does not always work
! completely reliably and, depending on the implementation, some fonts
! may not be found unless you explicitly write @emph{all} required
! dashes.)  Here is an example, which happens to specify the font whose
! nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 732,737 ****
--- 738,746 ----
  @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
+ (In this, @var{charset} actually consists of two fields, separated by
+ a dash, see below.)
+ 
  @table @var
  @item maker
  This is the name of the font manufacturer.

Diff finished at Tue Sep 16 21:22:40
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17  2:34       ` Luc Teirlinck
@ 2003-09-17 12:23         ` Stephen J. Turnbull
  2003-09-17 12:49           ` Jason Rumney
  2003-09-18 11:05         ` Richard Stallman
  1 sibling, 1 reply; 34+ messages in thread
From: Stephen J. Turnbull @ 2003-09-17 12:23 UTC (permalink / raw)
  Cc: akochoi, emacs-devel

Looks good to me.  A few comments.

>>>>> "Luc" == Luc Teirlinck <teirllm@dms.auburn.edu> writes:

    Luc> I also replaced the `eleven' in:

    Luc>     Under X, each font has a long name which consists of
    Luc> eleven words or numbers, separated by dashes.

    Luc> by `fourteen', because this seems like an obvious error.  An
    Luc> XLFD contains fourteen fields, even though one of these is
    Luc> usually empty.

That is certainly correct for X11Rn, for n >= 4.  In

------------------------------------------------------------------------
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind
! of name.  You can use wildcard patterns for the font name; then Emacs
! lets X choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  (Theoretically, this
! includes dashes.  In practice however, this does not always work
! completely reliably and, depending on the implementation, some fonts
! may not be found unless you explicitly write @emph{all} required
! dashes.)  Here is an example, which happens to specify the font whose
! nickname is @samp{6x13}:
------------------------------------------------------------------------

I would change the last few lines to:

------------------------------------------------------------------------
and @samp{?} matches any single character.  Wildcards may match
dashes.  However, matching is implementation-dependent, and often is
inaccurate, when wildcards match dashes.  It works best if you supply
all 14 dashes.  Here is an example, which happens to specify the font
whose nickname is @samp{6x13}:
------------------------------------------------------------------------

In the following

------------------------------------------------------------------------
  @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
+ (In this, @var{charset} actually consists of two fields, separated by
+ a dash, see below.)
------------------------------------------------------------------------

I have to question the use of the term "charset" which has a different
meaning in Mule, which also historically typically used names (such as
latin-iso8859-1) that are not valid XLFD registries.  It is true that
most Mule charsets correspond to an XLFD registry, but not all do.  I
would substitute "registry", which is a strange term to most people,
but won't bring in the connotations of "charset."  (Of course this use
of "charset" is previous to your change.  And that change should be
made whether or not my suggestion about "registry" is accepted.)


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17 12:23         ` Stephen J. Turnbull
@ 2003-09-17 12:49           ` Jason Rumney
  2003-09-17 16:55             ` Luc Teirlinck
  0 siblings, 1 reply; 34+ messages in thread
From: Jason Rumney @ 2003-09-17 12:49 UTC (permalink / raw)
  Cc: Luc Teirlinck, emacs-devel

Stephen J. Turnbull wrote:

> In the following
> 
> ------------------------------------------------------------------------
>   @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
>   @end smallexample
>   
> + (In this, @var{charset} actually consists of two fields, separated by
> + a dash, see below.)
> ------------------------------------------------------------------------
> 
> I have to question the use of the term "charset" which has a different
> meaning in Mule, which also historically typically used names (such as
> latin-iso8859-1) that are not valid XLFD registries.  It is true that
> most Mule charsets correspond to an XLFD registry, but not all do.  I
> would substitute "registry", which is a strange term to most people,
> but won't bring in the connotations of "charset."

The "charset" portion is actually composed of 
var{registry}-@var{encoding}, so it might be useful to make that clear, 
otherwise the reader might wonder where the 14th field went.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17 12:49           ` Jason Rumney
@ 2003-09-17 16:55             ` Luc Teirlinck
  2003-09-18 15:14               ` Richard Stallman
  2003-09-19 11:01               ` Stephen J. Turnbull
  0 siblings, 2 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-17 16:55 UTC (permalink / raw)
  Cc: stephen, emacs-devel

What about the following patch, which incorporates the suggestions
made by Stephen and Jason?  It still refers at one point to the
combined "registry-encoding" entity as a "character set", because I
believe that will make more sense to most people than "registry" and
"encoding", but I point out that it is not identical with MULE
character sets.


===File ~/cmdargs-diff-2====================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Wed Sep 17 10:53:27 2003
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 706,722 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind
! of name.  You can use wildcard patterns for the font name; then Emacs
! lets X choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  However, matching is
! implementation-dependent, and often inaccurate, when wildcards match
! dashes.  It works best if you supply all 14 dashes.  Here is an
! example, which happens to specify the font whose nickname is
! @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 729,735 ****
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
  @table @var
--- 734,740 ----
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
  @end smallexample
  
  @table @var
***************
*** 770,778 ****
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item charset
! This is the character set that the font depicts.
! Normally you should use @samp{iso8859-1}.
  @end table
  
  @cindex listing system fonts
--- 775,787 ----
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item registry
! @itemx encoding
! These make up the character set that the font depicts.  Note that this
! is different from MULE character sets.  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.
  @end table
  
  @cindex listing system fonts

Diff finished at Wed Sep 17 11:35:50
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17  2:34       ` Luc Teirlinck
  2003-09-17 12:23         ` Stephen J. Turnbull
@ 2003-09-18 11:05         ` Richard Stallman
  1 sibling, 0 replies; 34+ messages in thread
From: Richard Stallman @ 2003-09-18 11:05 UTC (permalink / raw)
  Cc: akochoi, stephen, emacs-devel

    What about the following patch?  I could commit it if desired.
    I also replaced the `eleven' in:

	Under X, each font has a long name which consists of eleven words or
	numbers, separated by dashes.

    by `fourteen', because this seems like an obvious error.  An XLFD
    contains fourteen fields, even though one of these is usually empty.

I don't know much about this, so please do what seems right.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17 16:55             ` Luc Teirlinck
@ 2003-09-18 15:14               ` Richard Stallman
  2003-09-19 11:01               ` Stephen J. Turnbull
  1 sibling, 0 replies; 34+ messages in thread
From: Richard Stallman @ 2003-09-18 15:14 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

    ! These make up the character set that the font depicts.  Note that this
    ! is different from MULE character sets.  You can use the
    ! @command{xfontsel} program to check which choices you have.

I suggest this replacement for that particular point:

    These together make up the X font character set that the font
    depicts.  (X font character sets are not the same as Emacs
    character sets, but they are solutions for the same problem.)
    You can use the @command{xfontsel} program to check which choices you have.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-17 16:55             ` Luc Teirlinck
  2003-09-18 15:14               ` Richard Stallman
@ 2003-09-19 11:01               ` Stephen J. Turnbull
  2003-09-19 14:34                 ` Luc Teirlinck
                                   ` (2 more replies)
  1 sibling, 3 replies; 34+ messages in thread
From: Stephen J. Turnbull @ 2003-09-19 11:01 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

>>>>> "Luc" == Luc Teirlinck <teirllm@dms.auburn.edu> writes:

    Luc> What about the following patch, which incorporates the
    Luc> suggestions made by Stephen and Jason?

I like it.

Still one nit to pick:
! @item registry
! @itemx encoding
! These make up the character set that the font depicts.  Note that this
! is different from MULE character sets.  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.

I would say "this is different from MULE charsets" rather than "this
is different from MULE character sets".

Related comment:

I wanted to add some advice about finding out a charset, but no luck.
It's a shame that (at least in XEmacs) there's no convenient way to do
M-: (charset-registry (char-charset (char-after (point)))) RET.  (We
don't even have a `describe-charset', for shame!  Maybe GNU Emacs
does, though.)  Also, it doesn't really give an immediately useful
answer (it's a regexp).  I'll put it on my list, but thought I'd throw
it out in case somebody knows how to do it already.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 11:01               ` Stephen J. Turnbull
@ 2003-09-19 14:34                 ` Luc Teirlinck
  2003-09-19 15:11                   ` Luc Teirlinck
  2003-09-20  7:50                   ` Richard Stallman
  2003-09-19 15:34                 ` Luc Teirlinck
  2003-09-20  3:30                 ` Luc Teirlinck
  2 siblings, 2 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-19 14:34 UTC (permalink / raw)
  Cc: jasonr, emacs-devel

The patch below incorporates the latest suggestions made by Richard
and Stephen.

It also includes some further changes.  

It points out that both font nicknames and XLFD's are
case-insensitive.  It also clarifies that wildcards can only be used
for XLFD's, not for nicknames.  (At least not in the situations we are
describing.  Certain Lisp functions _do_ allow wildcards in
nicknames.)

Also the sentence:

  By default, Emacs displays text in the font named @samp{9x15}, which
makes each character nine pixels wide and fifteen pixels high.

is obsolete since Emacs 21.

I listed:

-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1

as the default used by Emacs (under X), because that is the first font
tried by `x-create-frame' and in a fully uncustomized Emacs, that
choice does not seem to get overridden, at least not under X.  Emacs
does seem to use different defaults on other operating systems, so I
mentioned that the default only applies under X.

Any comments on this?


===File ~/cmdargs-diff-3====================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Fri Sep 19 08:58:52 2003
***************
*** 691,698 ****
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in the font named @samp{9x15}, which
! makes each character nine pixels wide and fifteen pixels high.  You can
  specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
--- 691,698 ----
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in a font which makes each character
! seven pixels wide and twelve pixels high.  ( See below.)  You can
  specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 706,724 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames.  For instance, @samp{9x15} is such a nickname.  This font
! makes each character nine pixels wide and fifteen pixels high.  You
! can use either kind of name.  Case is insignificant in both kinds.  In
! a long name, you can use wildcard patterns; then Emacs lets X choose
! one of the fonts that match the pattern.  The wildcard character
! @samp{*} matches any sequence of characters (including none) and
! @samp{?} matches any single character.  However, matching is
! implementation-dependent, and often inaccurate, when wildcards match
! dashes.  It works best if you supply all 14 dashes.  Here is an
! example, which happens to specify the font whose nickname is
! @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 725,735 ****
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
  @table @var
--- 732,748 ----
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
+   The default font used by Emacs (under X) is:
+ 
+ @smallexample
+ -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ @end smallexample
+ 
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
  @end smallexample
  
  @table @var
***************
*** 770,778 ****
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item charset
! This is the character set that the font depicts.
! Normally you should use @samp{iso8859-1}.
  @end table
  
  @cindex listing system fonts
--- 783,796 ----
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item registry
! @itemx encoding
! These together make up the X font character set that the font depicts.
! (X font character sets are not the same as Emacs charsets, but they
! are solutions for the same problem.)  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.
  @end table
  
  @cindex listing system fonts

Diff finished at Fri Sep 19 09:02:24
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 14:34                 ` Luc Teirlinck
@ 2003-09-19 15:11                   ` Luc Teirlinck
  2003-09-20  7:50                   ` Richard Stallman
  1 sibling, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-19 15:11 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

>From my previous message:

   It also clarifies that wildcards can only be used
   for XLFD's, not for nicknames.  (At least not in the situations we are
   describing.  Certain Lisp functions _do_ allow wildcards in
   nicknames.)

No, that was a mistake of mine.  Wildcards in nicknames are allowed.
(I forgot to quote my wildcards, in spite of all warnings not to do
so.)  I will correct this.

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 11:01               ` Stephen J. Turnbull
  2003-09-19 14:34                 ` Luc Teirlinck
@ 2003-09-19 15:34                 ` Luc Teirlinck
  2003-09-19 22:53                   ` Luc Teirlinck
  2003-09-20 21:26                   ` Richard Stallman
  2003-09-20  3:30                 ` Luc Teirlinck
  2 siblings, 2 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-19 15:34 UTC (permalink / raw)
  Cc: jasonr, emacs-devel

Corrected patch (my previous one mistakenly suggested that wildcards
are not allowed in font nicknames):


===File ~/cmdargs-diff-4====================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Fri Sep 19 10:23:15 2003
***************
*** 691,698 ****
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in the font named @samp{9x15}, which
! makes each character nine pixels wide and fifteen pixels high.  You can
  specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
--- 691,698 ----
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in a font which makes each character
! seven pixels wide and twelve pixels high.  ( See below.)  You can
  specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 706,724 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames.  For instance, @samp{9x15} is such a nickname.  This font
! makes each character nine pixels wide and fifteen pixels high.  You
! can use either kind of name.  Case is insignificant in both kinds.
! You can use wildcard patterns for the font name; then Emacs lets X
! choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  However, matching is
! implementation-dependent, and often inaccurate, when wildcards match
! dashes in a long name.  It works best if you supply all 14 dashes.
! Here is an example, which happens to specify the font whose nickname
! is @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 725,735 ****
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
  @table @var
--- 732,748 ----
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
+   The default font used by Emacs (under X) is:
+ 
+ @smallexample
+ -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ @end smallexample
+ 
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
  @end smallexample
  
  @table @var
***************
*** 770,778 ****
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item charset
! This is the character set that the font depicts.
! Normally you should use @samp{iso8859-1}.
  @end table
  
  @cindex listing system fonts
--- 783,796 ----
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item registry
! @itemx encoding
! These together make up the X font character set that the font depicts.
! (X font character sets are not the same as Emacs charsets, but they
! are solutions for the same problem.)  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.
  @end table
  
  @cindex listing system fonts

Diff finished at Fri Sep 19 10:25:31
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 15:34                 ` Luc Teirlinck
@ 2003-09-19 22:53                   ` Luc Teirlinck
  2003-09-20 21:27                     ` Richard Stallman
  2003-09-20 21:26                   ` Richard Stallman
  1 sibling, 1 reply; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-19 22:53 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

One more remark about (emacs)Font X:

I do not know whether it would be useful to include the little extra
paragraph below starting with "Note that if you use a wildcard pattern
on the command line,..." or whether that is redundant given the two
examples above it.  Note that this is tricky.  For instance if you use
bash and the `nullglob' shell option is not enabled (it is not by
default) then bash leaves any pattern that matches no file unchanged.
Hence the user could easily get the impression that quoting is
unnecessary, because most of the time it is not.  With `nullglob'
enabled (as I do) bash replaces a pattern that does not match any file
with the empty list and failing to quote _always_ leads to trouble.

Relevant excerpt with proposed extra paragraph:

Here is an example, which happens to specify the font whose nickname
is @samp{6x13}:

@smallexample
emacs -fn \
  "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" &
@end smallexample

@noindent
You can also specify the font in your @file{.Xdefaults} file:

@smallexample
emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
@end smallexample

  Note that if you use a wildcard pattern on the command line, you
need to enclose it in single or double quotes, to prevent the shell
from accidentally expanding it into a list of file names.  On the
other hand, you should not quote the name in the @file{.Xdefaults}
file.

The default font used by Emacs (under X) is:

@smallexample
-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
@end smallexample

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 11:01               ` Stephen J. Turnbull
  2003-09-19 14:34                 ` Luc Teirlinck
  2003-09-19 15:34                 ` Luc Teirlinck
@ 2003-09-20  3:30                 ` Luc Teirlinck
  2 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-20  3:30 UTC (permalink / raw)
  Cc: jasonr, emacs-devel

I am afraid that my previous patch may have contained claims that are
only valid for my own screen resolution.  (I do not believe that the
default XLFD really automatically yields a font that is seven pixels
wide and twelve pixels high, as claimed in my previous patch, in all
setups.)  I include a new patch that also contains the paragraph I
mentioned before, but I could, of course, take it back out if it would
be considered unnecessary.


===File ~/cmdargs-diff-5====================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Fri Sep 19 22:10:01 2003
***************
*** 691,699 ****
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in the font named @samp{9x15}, which
! makes each character nine pixels wide and fifteen pixels high.  You can
! specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
  
--- 691,698 ----
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in a twelve point Courier font.  You
! can specify a different font on your command line through the option
  @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
  @samp{-fn}).
  
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 705,723 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames.  For instance, @samp{9x15} is such a nickname.  This font
! makes each character nine pixels wide and fifteen pixels high.  You
! can use either kind of name.  Case is insignificant in both kinds.
! You can use wildcard patterns for the font name; then Emacs lets X
! choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  However, matching is
! implementation-dependent, and often inaccurate, when wildcards match
! dashes in a long name.  It works best if you supply all 14 dashes.
! Here is an example, which happens to specify the font whose nickname
! is @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 725,735 ****
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
  @table @var
--- 731,753 ----
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
+   Note that if you use a wildcard pattern on the command line, you
+ need to enclose it in single or double quotes, to prevent the shell
+ from accidentally expanding it into a list of file names.  On the
+ other hand, you should not quote the name in the @file{.Xdefaults}
+ file.
+ 
+ The default font used by Emacs (under X) is:
+ 
+ @smallexample
+ -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ @end smallexample
+ 
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
  @end smallexample
  
  @table @var
***************
*** 770,778 ****
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item charset
! This is the character set that the font depicts.
! Normally you should use @samp{iso8859-1}.
  @end table
  
  @cindex listing system fonts
--- 788,801 ----
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item registry
! @itemx encoding
! These together make up the X font character set that the font depicts.
! (X font character sets are not the same as Emacs charsets, but they
! are solutions for the same problem.)  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.
  @end table
  
  @cindex listing system fonts

Diff finished at Fri Sep 19 22:10:46
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 14:34                 ` Luc Teirlinck
  2003-09-19 15:11                   ` Luc Teirlinck
@ 2003-09-20  7:50                   ` Richard Stallman
  2003-09-20 12:04                     ` Luc Teirlinck
  2003-09-20 13:06                     ` Luc Teirlinck
  1 sibling, 2 replies; 34+ messages in thread
From: Richard Stallman @ 2003-09-20  7:50 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

    !   By default, Emacs displays text in a font which makes each character
    ! seven pixels wide and twelve pixels high.

I don't think that is true.  The default font seems to have the same
height as 9x15, but a different width.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-20  7:50                   ` Richard Stallman
@ 2003-09-20 12:04                     ` Luc Teirlinck
  2003-09-20 13:06                     ` Luc Teirlinck
  1 sibling, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-20 12:04 UTC (permalink / raw)
  Cc: stephen, jasonr, emacs-devel

Richard Stallman wrote:

       !   By default, Emacs displays text in a font which makes each character
       ! seven pixels wide and twelve pixels high.

   I don't think that is true.  The default font seems to have the same
   height as 9x15, but a different width.

It depends on the screen resolution.  I already corrected this in the
latest patch I sent.  I believe that the new description of the
default as a "twelve point Courier" should be generally valid, at
least under X, as long as the font is available.

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-20  7:50                   ` Richard Stallman
  2003-09-20 12:04                     ` Luc Teirlinck
@ 2003-09-20 13:06                     ` Luc Teirlinck
  1 sibling, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-20 13:06 UTC (permalink / raw)
  Cc: stephen, jasonr, emacs-devel

I believe it would be better to add a parenthetical remark to the
first line of my patch:

  By default, Emacs displays text in a twelve point Courier font (when
using X).

On Mac OS X `Monaco' seems to be the default and I believe that on MS
Windows a 10pt font is used.

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 15:34                 ` Luc Teirlinck
  2003-09-19 22:53                   ` Luc Teirlinck
@ 2003-09-20 21:26                   ` Richard Stallman
  2003-09-22 10:36                     ` Stephen J. Turnbull
  1 sibling, 1 reply; 34+ messages in thread
From: Richard Stallman @ 2003-09-20 21:26 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

      However, matching is
    ! implementation-dependent, and often inaccurate, when wildcards match
    ! dashes in a long name.  It works best if you supply all 14 dashes.

The first sentence seems to imply that wildcards are so unreliable
that you should never use them.  It is clearer to say

      However, matching is
     implementation-dependent, and can be inaccurate when wildcards match
     dashes in a long name.  For reliable results, supply all 14 dashes
     and use wildcards only within a field.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-19 22:53                   ` Luc Teirlinck
@ 2003-09-20 21:27                     ` Richard Stallman
  2003-09-21  1:13                       ` Luc Teirlinck
  0 siblings, 1 reply; 34+ messages in thread
From: Richard Stallman @ 2003-09-20 21:27 UTC (permalink / raw)
  Cc: stephen, jasonr, teirllm, emacs-devel

      Note that if you use a wildcard pattern on the command line, you
    need to enclose it in single or double quotes, to prevent the shell
    from accidentally expanding it into a list of file names.  On the
    other hand, you should not quote the name in the @file{.Xdefaults}
    file.

That's a good clarification--please do add it.

Thanks.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-20 21:27                     ` Richard Stallman
@ 2003-09-21  1:13                       ` Luc Teirlinck
  0 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-21  1:13 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jasonr

Below is the latest patch with all current suggestions taken into
account:


===File ~/cmdargs-diff-6====================================
cd ~/
diff -c /home/teirllm/cmdargs.old.texi /home/teirllm/cmdargs.texi
*** /home/teirllm/cmdargs.old.texi	Tue Sep 16 18:58:01 2003
--- /home/teirllm/cmdargs.texi	Sat Sep 20 19:58:07 2003
***************
*** 691,701 ****
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in the font named @samp{9x15}, which
! makes each character nine pixels wide and fifteen pixels high.  You can
! specify a different font on your command line through the option
! @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
! @samp{-fn}).
  
  @table @samp
  @item -fn @var{name}
--- 691,700 ----
  @appendixsec Font Specification Options
  @cindex font name (X Window System)
  
!   By default, Emacs displays text in a twelve point Courier font (when
! using X).  You can specify a different font on your command line
! through the option @samp{-fn @var{name}} (or @samp{--font}, which is
! an alias for @samp{-fn}).
  
  @table @samp
  @item -fn @var{name}
***************
*** 706,717 ****
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of eleven words or
! numbers, separated by dashes.  Some fonts also have shorter
! nicknames---@samp{9x15} is such a nickname.  You can use either kind of
! name.  You can use wildcard patterns for the font name; then Emacs lets
! X choose one of the fonts that match the pattern.  Here is an example,
! which happens to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
--- 705,723 ----
  Use font @var{name} as the default font.
  @end table
  
!   Under X, each font has a long name which consists of fourteen words
! or numbers, separated by dashes.  Some fonts also have shorter
! nicknames.  For instance, @samp{9x15} is such a nickname.  This font
! makes each character nine pixels wide and fifteen pixels high.  You
! can use either kind of name.  Case is insignificant in both kinds.
! You can use wildcard patterns for the font name; then Emacs lets X
! choose one of the fonts that match the pattern.  The wildcard
! character @samp{*} matches any sequence of characters (including none)
! and @samp{?} matches any single character.  However, matching is
! implementation-dependent, and can be inaccurate when wildcards match
! dashes in a long name.  For reliable results, supply all 14 dashes and
! use wildcards only within a field.  Here is an example, which happens
! to specify the font whose nickname is @samp{6x13}:
  
  @smallexample
  emacs -fn \
***************
*** 725,735 ****
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
  @end smallexample
  
  @table @var
--- 731,753 ----
  emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
  @end smallexample
  
+   Note that if you use a wildcard pattern on the command line, you
+ need to enclose it in single or double quotes, to prevent the shell
+ from accidentally expanding it into a list of file names.  On the
+ other hand, you should not quote the name in the @file{.Xdefaults}
+ file.
+ 
+ The default font used by Emacs (under X) is:
+ 
+ @smallexample
+ -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ @end smallexample
+ 
    A long font name has the following form:
  
  @smallexample
  -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
! @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
  @end smallexample
  
  @table @var
***************
*** 770,778 ****
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item charset
! This is the character set that the font depicts.
! Normally you should use @samp{iso8859-1}.
  @end table
  
  @cindex listing system fonts
--- 788,801 ----
  (character cell).
  @item width
  This is the average character width, in pixels, multiplied by ten.
! @item registry
! @itemx encoding
! These together make up the X font character set that the font depicts.
! (X font character sets are not the same as Emacs charsets, but they
! are solutions for the same problem.)  You can use the
! @command{xfontsel} program to check which choices you have.  However,
! normally you should use @samp{iso8859} for @var{registry} and @samp{1}
! for @var{encoding}.
  @end table
  
  @cindex listing system fonts

Diff finished at Sat Sep 20 20:01:26
============================================================

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-20 21:26                   ` Richard Stallman
@ 2003-09-22 10:36                     ` Stephen J. Turnbull
  2003-09-22 18:23                       ` Luc Teirlinck
  0 siblings, 1 reply; 34+ messages in thread
From: Stephen J. Turnbull @ 2003-09-22 10:36 UTC (permalink / raw)
  Cc: stephen, emacs-devel, Luc Teirlinck, jasonr

>>>>> "rms" == Richard Stallman <rms@gnu.org> writes:

      However, matching is
    ! implementation-dependent, and often inaccurate, when wildcards match
    ! dashes in a long name.  It works best if you supply all 14 dashes.

    rms> The first sentence seems to imply that wildcards are so
    rms> unreliable that you should never use them.  It is clearer to
    rms> say

No, it's not.  On some platforms, wildcards that match dashes _are_ so
inaccurate that you should never use them in production code.  Luc
gave an example.  However, it may be convenient for interactive or
one-shot code use, or if it works in an init file.

    rms>      However, matching is implementation-dependent, and can
    rms> be inaccurate when wildcards match dashes in a long name.
    rms> For reliable results, supply all 14 dashes and use wildcards
    rms> only within a field.

The second sentence is a distinct improvement (especially as it
implies partial matching in a field, which often is useful, such as
...-jisx0208*-0 to catch names which specify the year of the
standard), but I recommend that the first sentence be left as is.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-22 10:36                     ` Stephen J. Turnbull
@ 2003-09-22 18:23                       ` Luc Teirlinck
  2003-09-22 22:57                         ` Luc Teirlinck
  0 siblings, 1 reply; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-22 18:23 UTC (permalink / raw)
  Cc: stephen, jasonr, rms, emacs-devel

Richard Stallman wrote:

	 However, matching is
       ! implementation-dependent, and often inaccurate, when wildcards match
       ! dashes in a long name.  It works best if you supply all 14 dashes.

   The first sentence seems to imply that wildcards are so unreliable
   that you should never use them.  It is clearer to say

	 However, matching is
	implementation-dependent, and can be inaccurate when wildcards match
	dashes in a long name.  For reliable results, supply all 14 dashes
	and use wildcards only within a field.

and Stephen J. Turnbull replied:

   The second sentence is a distinct improvement (especially as it
   implies partial matching in a field, which often is useful, such as
   ...-jisx0208*-0 to catch names which specify the year of the
   standard), but I recommend that the first sentence be left as is.

I believe the difference of opinion is limited to:

"often inaccurate" (Stephen's version) vs "can be inaccurate"
(Richard's version).

I believe that we all agree with what is meant to be communicated,
namely:

1.  It is OK to try out, say:

M-x set-frame-font RET *-courier-medium-r-*-14-*

Why type fourteen dashes if you can get what you want with the above?
(This works for me.)

2.  If you do

M-x set-frame-font RET -abisource-courier-bold-i-normal--17-*

and get the error message:

Font `-abisource-courier-bold-i-normal--17-*' is not defined

(as I do), then this does _not_ mean that there really is no such font.

In fact, after supplying the fourteen dashes I get the font:

-abisource-courier-bold-i-normal--17-135-90-91-p-100-iso8859-1

3.  Always supply fourteen dashes for Elisp code, except when only
    meant for personal use.  All XLFD's I found in the Emacs
    source code actually adhere to this rule.

To me, both versions suggest 1-3 above, even though Richard's puts
somewhat more emphasis on (1) and Stephen's on (2) and (3).  To me the
difference does not seem terribly big.  My patch currently contains
Richard's version, but I will wait at least 24 more hours before
committing it, so everybody can make further comments.  (Of course,
further changes can also be made after I commit.)

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-22 18:23                       ` Luc Teirlinck
@ 2003-09-22 22:57                         ` Luc Teirlinck
  2003-09-22 23:08                           ` Luc Teirlinck
  0 siblings, 1 reply; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-22 22:57 UTC (permalink / raw)
  Cc: stephen, emacs-devel, rms, jasonr

>From my previous message:

   In fact, after supplying the fourteen dashes I get the font:

   -abisource-courier-bold-i-normal--17-135-90-91-p-100-iso8859-1

Actually, I should have used (frame-parameter nil 'font) instead of
simply copying from the  C-u C-x = output.

The frame's font I got was:

-abisource-courier-bold-i-normal--17-123-100-100-p-0-iso8859-1

Sincerely,

Luc.

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

* Re: Setting font to Lucida Grande on Mac OS X
  2003-09-22 22:57                         ` Luc Teirlinck
@ 2003-09-22 23:08                           ` Luc Teirlinck
  0 siblings, 0 replies; 34+ messages in thread
From: Luc Teirlinck @ 2003-09-22 23:08 UTC (permalink / raw)
  Cc: stephen, emacs-devel, rms, jasonr

Sorry, I had the wrong thing in the kill ring:

-abisource-courier-bold-i-normal--17-123-100-100-p-0-iso8859-1

was xlsfonts output.  

(frame-parameter nil 'font) actually returned:

-abisource-courier-bold-i-normal--17-123-100-100-p-100-iso8859-1

All of this makes mo difference as to the original points, however.

Sincerely,

Luc.

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

end of thread, other threads:[~2003-09-22 23:08 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-14 22:43 Setting font to Lucida Grande on Mac OS X Sancho Neves-Graca
2003-09-14 23:10 ` Luc Teirlinck
2003-09-15  5:55 ` Andrew Choi
2003-09-15 15:09   ` Luc Teirlinck
2003-09-16  1:19     ` Sancho Neves-Graca
2003-09-16  3:54     ` Stephen J. Turnbull
2003-09-17  2:34       ` Luc Teirlinck
2003-09-17 12:23         ` Stephen J. Turnbull
2003-09-17 12:49           ` Jason Rumney
2003-09-17 16:55             ` Luc Teirlinck
2003-09-18 15:14               ` Richard Stallman
2003-09-19 11:01               ` Stephen J. Turnbull
2003-09-19 14:34                 ` Luc Teirlinck
2003-09-19 15:11                   ` Luc Teirlinck
2003-09-20  7:50                   ` Richard Stallman
2003-09-20 12:04                     ` Luc Teirlinck
2003-09-20 13:06                     ` Luc Teirlinck
2003-09-19 15:34                 ` Luc Teirlinck
2003-09-19 22:53                   ` Luc Teirlinck
2003-09-20 21:27                     ` Richard Stallman
2003-09-21  1:13                       ` Luc Teirlinck
2003-09-20 21:26                   ` Richard Stallman
2003-09-22 10:36                     ` Stephen J. Turnbull
2003-09-22 18:23                       ` Luc Teirlinck
2003-09-22 22:57                         ` Luc Teirlinck
2003-09-22 23:08                           ` Luc Teirlinck
2003-09-20  3:30                 ` Luc Teirlinck
2003-09-18 11:05         ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-09-14 23:09 Sancho Neves-Graca
2003-09-14 23:51 ` Luc Teirlinck
2003-09-14 23:55 ` Luc Teirlinck
2003-09-15  4:10 ` Luc Teirlinck
2003-09-15  4:34   ` Luc Teirlinck
2003-09-15  4:47 ` Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).