From owner-ntemacs-users@june  Wed Aug 28 17:19:07 1996
X-VM-Message-Order:
	(4 3 2 1)
X-VM-Summary-Format: "%3n%a %-17.17F %w %3m %2d %y %.5h \"%s\" (%l) \n"
X-VM-Labels: nil
X-VM-VHeader: ("Resent-" "From:" "Sender:" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:") nil
X-VM-Bookmark: 1
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "28" "August" "1996" "16:44:00" "PDT" "George V. Reilly" "georger@microcrafts.com" nil "88" "RE: Getting italic fonts (was Re: fonts in Info mode)" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id RAA25568 for <voelker@june.cs.washington.edu>; Wed, 28 Aug 1996 17:19:07 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id RAA42194 for <voelker@joker.cs.washington.edu>; Wed, 28 Aug 1996 17:19:05 -0700
Received: from halcyon.com (smtp2.halcyon.com [198.137.231.18]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id QAA22217 for <ntemacs-users@cs.washington.edu>; Wed, 28 Aug 1996 16:45:40 -0700
Received: from ms-smtp.wa.com by halcyon.com with SMTP id AA20471   (5.65c/IDA-1.4.4 for <ntemacs-users@cs.washington.edu>); Wed, 28 Aug 1996 16:45:38 -0700
Received: by ms-smtp.wa.com with Microsoft Mail 	id <3224DB36@ms-smtp.wa.com>; Wed, 28 Aug 96 16:50:14 PDT
Message-Id: <3224DB36@ms-smtp.wa.com>
Encoding: 88 TEXT
X-Mailer: Microsoft Mail V3.0
From: "George V. Reilly" <georger@microcrafts.com>
To: Andrew Innes <andrewi@harlequin.co.uk>
Cc: ntemacs-users <ntemacs-users@cs.washington.edu>
Subject: RE: Getting italic fonts (was Re: fonts in Info mode)
Date: Wed, 28 Aug 96 16:44:00 PDT


) >I dimly recall someone remarking in the past that the problem was that
) >Bold and Italic faces don't necessarily have the same width as their
) >Regular counterparts in Windows, but they do in X.  Can't you just
) >override the lfWidth of the LOGFONT to force the Bold, Italic, and
) >Bold-Italic variants to have the same width, or use a character cell
) >grid which is as wide as the widest font?
)
) Well, I suppose we could change the NT Emacs text output functions to
) draw individual characters at the spacing of the bold-italic variation,
) but for most fonts it would look wrong (each char would be 2-3 pixels
) too wide, which is very noticeable).

I've done this in the past and it's not really that noticeable
in practice, unless you're using very small fonts, where the
extra pixel or two in width are a large proportion of the
overall width of a character cell.  It's not all that wonderful
either, but then anything involving monospaced fonts rarely is.

) Because the italic variation for most fonts is synthesized (and hence
) the characters extend outside the bounding box for normal characters,
) leaving flotsom on the screen when you scroll or move the cursor over
) text), the generation of italic faces is disabled by default.

The way to handle this is to calculate the maximum italic
overhang (see below).  When you're calculating the bounding box
of invalidated characters, you need to add this to the
right-hand edge of the RECT.  Your WM_PAINT handler should then
automatically repaint the character immediately to the right of
the invalid ones.  Your paint handler will have to paint in all
of the background colours first and then paint the text over the
background with the background mode set to TRANSPARENT.  By
default, text is painted in OPAQUE, but that will cause the
overhanging italics characters to be clipped.

To paint the text, you should use something like:
    ExtTextOut(hdc, rc.left, rc.top, 0, NULL, atchRow + iFirst,
               cch, adxWidths + iFirst);
adxWidths is an array of INTs, each initialized to m_uCellWidth.

/* This code was quickly ripped out of MFC and crudely adapted to
 * use SDK calls so it probably won't compile */
void
GetCharCellGridSize()
{
    HWND  hwnd = GetDesktopWindow();
    HDC   hdc = GetWindowDC(hwnd);
      

    m_uCellWidth = m_uCellHeight = m_nItalicOverhang = 0;

    for (hfnt in all active fonts)
    {
        static const char ach[] = {'W', 'f', 'g', 'M'};
        SIZE  siz;
        TEXTMETRIC tm;
        ABC abc;
        HFONT hfntOld = SelectFont(hdc, hfnt);
          

        GetTextMetrics(hdc, &tm);
        GetCharABCWidths(hdc, 'W', 'W', &abc);

        // I find this gives more accurate results for cell size
        // than GetTextMetrics does
        GetTextExtentPoint(hdc, ach, sizeof(ach), &siz);

        SelectFont(hdc, hfntOld);
          

        m_uCellWidth = max(m_uCellWidth, siz.cx / sizeof(ach));
        m_uCellHeight = max(m_uCellHeight, siz.cy);
        m_nItalicOverhang = max(m_nItalicOverhang, -abc.abcC);
    }

    ReleaseDC(hwnd, hdc);
}

The width of the client area of the frame is (Columns * m_uCellWidth
+ m_nItalicOverhang) and the height is (Rows * m_uCellHeight).

I can send you MFC code that implements all of this, if you like.
 --
/George V. Reilly   <georger@microcrafts.com>   <gvr@halcyon.com>
MicroCrafts, Inc., 17371 NE 67th Ct #205, Redmond, WA 98052, USA.
Tel: +1 206/250-0014  Fax: 206/250-0100  Web: www.microcrafts.com
Vim 4 (vi clone) for NT & Windows 95: http://www.halcyon.com/gvr/
pgp fingerprint: e2 b4 83 64 11 52 21 ea  bf d8 51 c2 11 00 78 fc  

From owner-ntemacs-users@june  Wed Aug 28 07:20:27 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "28" "August" "1996" "11:00:06" "+0200" "Ulrich Beyer" "uli@wossolit.teles.de" nil "42" "Re: 2 ntemacs questions" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id HAA24632 for <voelker@june.cs.washington.edu>; Wed, 28 Aug 1996 07:20:27 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id HAA42138 for <voelker@joker.cs.washington.edu>; Wed, 28 Aug 1996 07:20:26 -0700
Received: from mail.roka.net (mail.roka.NET [194.97.3.4]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id GAA20551 for <ntemacs-users@cs.washington.edu>; Wed, 28 Aug 1996 06:27:04 -0700
Received: from wossolit.teles.de by mail.roka.net with SMTP (PP)            id <00827-0@mail.roka.net>; Wed, 28 Aug 1996 15:26:09 +0200
Received: from egelbrut.teles.de (dhcp22)            by teles.de (5.0/TELES-MAILER-04-04-96) id AA22343;           Wed, 28 Aug 1996 15:18:43 +0000
Message-Id: <9608281518.AA22343@ teles.de>
X-Msmail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
From: Ulrich Beyer <uli@wossolit.teles.de>
To: Darin Johnson <djohnso@condor.peregrine.com>,         ntemacs-users <ntemacs-users@cs.washington.edu>
Subject: Re: 2 ntemacs questions
Date: Wed, 28 Aug 1996 11:00:06 +0200

Hi,

There has been a long thread about the problem with bold and italic fonts.
It seems to me that

- fonts that haven't got an italic or bold representation within the system
(e.g. fixedsys) cannot be displayed bold or italic at all.

- fonts whose italic or bold representations are not of the same height as
the default font is (e.g. Courier New's italic face is higher than the
normal and bold ones) cannot be displayed italic or bold no matter what
value win32-enable-italics has (?). This is because FSF Emacs cannot
display faces with variable heights whereas XEmacs can.

If you would like to use Courier New you will be able to use bold and
normal faces but I didn't succeed yet to display italic faces with that
font.

Correct me if I'm wrong ...

=uli=

----------
> From: Darin Johnson <djohnso@condor.peregrine.com>
> To: ntemacs-users@cs.washington.edu
> Subject: 2 ntemacs questions
> Date: Mittwoch, 28. August 1996 03:38
> 
> First, how can I get bold and italic fonts enabled as faces?
> I've done:
>     (setq win32-enable-italics t)
>     (set-default-font "-*-Fixedsys-normal-r-*-*-17-102-*-*-c-*-*-ansi-")
>     ;(set-face-font 'italics
"-*-Fixedsys-normal-i-*-*-17-102-*-*-c-*-*-ansi-")
> 
> The last line is commented out because it complains "no matching fonts
> are the same height as the frame default font"...
> 
> Also, is there a way to have long lines wrap rather than be cut off
> with a "$"?  Ie, when I compile within emacs I can't see the most
> vital part of the error messages.  It wraps in a 19.28 version but
> I don't see anything special that I set...

From owner-ntemacs-users@june  Tue Aug 27 13:36:42 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" "27" "August" "1996" "15:54:41" "-0400" "Jerry Liebelson" "jl@ingress.com" nil "61" "Re: Getting italic fonts (was Re: fonts in Info mode)" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id NAA05954 for <voelker@june.cs.washington.edu>; Tue, 27 Aug 1996 13:36:42 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA43217 for <voelker@joker.cs.washington.edu>; Tue, 27 Aug 1996 13:36:40 -0700
Received: from starbase.ingress.com (ingress.com [199.171.57.2]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id MAA01186 for <ntemacs-users@cs.washington.edu>; Tue, 27 Aug 1996 12:53:00 -0700
Received: from EARTH by starbase.ingress.com (SMI-8.6/SMI-SVR4  ) 	id PAA06570; Tue, 27 Aug 1996 15:56:17 -0400
Message-Id: <2.2.32.19960827195441.0094c6c8@ingress.com>
X-Sender: jl@ingress.com
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: Jerry Liebelson <jl@ingress.com>
To: Andrew Innes <andrewi@harlequin.co.uk>, georger@microcrafts.com
Cc: ntemacs-users@cs.washington.edu
Subject: Re: Getting italic fonts (was Re: fonts in Info mode)
Date: Tue, 27 Aug 1996 15:54:41 -0400

At 05:44 PM 8/27/96 +0100, Andrew Innes wrote:
>
>
>Lucida Console doesn't appear to have explicitly designed bold or italic
>variations though, because Emacs certainly does ask for the bold
>variation at least.  I suspect the bold variation is not returned
>because it is wider than the normal face.

  I can see bold and italic variants of Lucida Console (via set-default-font,
for example), but emacs reports an error when you try to set the bold Lucida
Console variant for the 'bold face (using set-face-font) is
 
   "No matching fonts are the same height as the frame default font"

(assuming that you previously set the default font with normal Lucida Console)


On the other hand, if I try to do the same thing using Lucida Sans Typewriter

   (set-default-font
         "-*-Lucida Sans Typewriter-normal-r-*-*-13-97-*-*-c-*-*-ansi-")

   (set-face-font 'bold  
       "-*-Lucida Sans Typewriter-semibold-r-*-*-13-97-*-*-c-*-*-ansi-")

 I don't get the error message, but the bold face still isn't bold.
  

>The only font I know of where the italic and bold variations are the
>same width as the normal face is Courier New...

  Yes, Courier New seems to work fine. My problem with Courier New, however, is
that it's too widely spaced, making my emacs window wider than desired. I prefer
the look of courier to Lucida Sans Typewriter but the latter is more closely
spaced and I can see more text for the given window width.

 DOES ANYBODY KNOW OF A COURIER TRUETYPE FONT THAT IS MORE CLOSELY SPACED THAN
THE COURIER NEW THAT COMES WITH WINDOWS?

 OR FOR THAT MATTER, DOES ANYBODY KNOW OF ANY ALTERNATIVE FIXED-WIDTH FONTS TO
USE IN NT EMACS INSTEAD OF Courier, Lucida Console, and Lucida Sans Typewriter?


-jl


>
>Because the italic variation for most fonts is synthesized (and hence
>the characters extend outside the bounding box for normal characters,
>leaving flotsom on the screen when you scroll or move the cursor over
>text), the generation of italic faces is disabled by default.
>
>To enable it (ie. if you are using Courier New), add this line to your
>.emacs:
>
>  (setq win32-enable-italics t)
>
>AndrewI
>
>
>

From owner-ntemacs-users@june  Tue Aug 27 10:26:54 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" "27" "August" "1996" "17:44:51" "+0100" "Andrew Innes" "andrewi@harlequin.co.uk" nil "44" "Getting italic fonts (was Re: fonts in Info mode)" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id KAA16488 for <voelker@june.cs.washington.edu>; Tue, 27 Aug 1996 10:26:54 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA30784 for <voelker@joker.cs.washington.edu>; Tue, 27 Aug 1996 10:26:52 -0700
Received: from holly.cam.harlequin.co.uk (holly.cam.harlequin.co.uk [193.128.4.58]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id JAA11926 for <ntemacs-users@cs.washington.edu>; Tue, 27 Aug 1996 09:45:13 -0700
Received: from propos.long.harlequin.co.uk by holly.cam.harlequin.co.uk; Tue, 27 Aug 1996 17:44:55 +0100
Received: from woozle.long.harlequin.co.uk (woozle [193.128.93.77]) by propos.long.harlequin.co.uk (8.6.12/8.6.12) with SMTP id RAA17278; Tue, 27 Aug 1996 17:44:51 +0100
Message-Id: <199608271644.RAA17278@propos.long.harlequin.co.uk>
In-Reply-To: <3212AE9D@ms-smtp.wa.com> (georger@microcrafts.com)
From: Andrew Innes <andrewi@harlequin.co.uk>
To: georger@microcrafts.com
Cc: ntemacs-users@cs.washington.edu
Subject: Getting italic fonts (was Re: fonts in Info mode)
Date: Tue, 27 Aug 1996 17:44:51 +0100

On Wed, 14 Aug 96 18:10:00 PDT, "George V. Reilly" <georger@microcrafts.com> said:
>
>I made this change on my system and noticed that Bold and Italics faces
>don't work with Lucida Console and Italic faces don't work with Courier
>New (but Bold ones do).
>
>Any plans to fix this?

To get italics with Courier New, see below.

Lucida Console doesn't appear to have explicitly designed bold or italic
variations though, because Emacs certainly does ask for the bold
variation at least.  I suspect the bold variation is not returned
because it is wider than the normal face.

>I dimly recall someone remarking in the past that the problem was that
>Bold and Italic faces don't necessarily have the same width as their
>Regular counterparts in Windows, but they do in X.  Can't you just
>override the lfWidth of the LOGFONT to force the Bold, Italic, and
>Bold-Italic variants to have the same width, or use a character cell
>grid which is as wide as the widest font?

Well, I suppose we could change the NT Emacs text output functions to
draw individual characters at the spacing of the bold-italic variation,
but for most fonts it would look wrong (each char would be 2-3 pixels
too wide, which is very noticeable).

The only font I know of where the italic and bold variations are the
same width as the normal face is Courier New.  The only (minor) glitch
is that the italic variations are, for some inexplicable reason, one
pixel deeper than the other variations, so the line spacing is increased
by one pixel when italics are enabled (see below).

Because the italic variation for most fonts is synthesized (and hence
the characters extend outside the bounding box for normal characters,
leaving flotsom on the screen when you scroll or move the cursor over
text), the generation of italic faces is disabled by default.

To enable it (ie. if you are using Courier New), add this line to your
.emacs:

  (setq win32-enable-italics t)

AndrewI

From owner-ntemacs-users@june  Mon Aug 26 13:11:39 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Mon" "26" "August" "1996" "15:10:09" "-0400" "Jerry Liebelson" "jl@ingress.com" nil "100" "RE: Bold/Italic font faces don't display in 19.33.1/i386" "^From:" nil nil "8" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id NAA06301 for <voelker@june.cs.washington.edu>; Mon, 26 Aug 1996 13:11:39 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA41889 for <voelker@joker.cs.washington.edu>; Mon, 26 Aug 1996 13:11:37 -0700
Received: from starbase.ingress.com (ingress.com [199.171.57.2]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id MAA29497; Mon, 26 Aug 1996 12:08:56 -0700
Received: from EARTH by starbase.ingress.com (SMI-8.6/SMI-SVR4  ) 	id PAA22097; Mon, 26 Aug 1996 15:11:44 -0400
Message-Id: <2.2.32.19960826191009.0091b5bc@ingress.com>
X-Sender: jl@ingress.com (Unverified)
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: Jerry Liebelson <jl@ingress.com>
To: Ulrich Beyer <uli@wossolit.teles.de>,         "ntemacs-users@cs.washington.edu" <ntemacs-users@cs.washington.edu>
Cc: "voelker@cs.washington.edu" <voelker@cs.washington.edu>
Subject: RE: Bold/Italic font faces don't display in 19.33.1/i386
Date: Mon, 26 Aug 1996 15:10:09 -0400

At 12:21 PM 8/26/96 +0200, Ulrich Beyer wrote:
>Hi Jerry,
>
>I'm using the same version of both (emacs & OS) here. I have no problems using 
>bold and normal versions of Courier New within the same frame...

  Ok, I erroneously reported the problem. It seems that the italic and italic
variants don't work, not just bold alone.

  I have the following in my startup file:

    (set-default-font "-*-Courier New-normal-r-*-*-13-97-*-*-c-*-*-ansi-")
    (require 'font-lock)

  When emacs comes up and I run the list-faces-display command, I see the
following faces:
   bold
   bold-italic
   default
   highlight
   italic
   modeline
   region
   secondary-selection
   underline

The problem is:  The italic and bold-italic faces are not italic.  Yes, the bold
face is bold, but the bold-italic face is just bold and not also italic.

Moreover, calling set-default-font (or set-face-font) with an italic Courier
font has no effect - it's the same as using the regular ("r") font:

  (set-default-font "-*-Courier New-normal-i-*-*-13-97-*-*-c-*-*-ansi-")
  (set-face-font 'default "-*-Courier New-normal-i-*-*-13-97-*-*-c-*-*-ansi-")

Can you get italic fonts to display?

>May be you should try 
>
>	(set-face-font 'default "-*-Courier New-bold-r-*-*-13-97-*-*-c-*-*-ansi-")
>
>instead of (set-default-font ...).

   This only changes the 'default face and not the other variants shown by the
list-faces-display command.  set-default-font seems to change the base font on
which the other faces are based.

So I'm still wondering, how do I get italic faces to display or is this a bug?

-jerry















>=uli=
>
>----------
>From: 	Jerry Liebelson
>Sent: 	Saturday, August 24, 1996 3:27 AM
>To: 	ntemacs-users@cs.washington.edu
>Cc: 	voelker@cs.washington.edu
>Subject: 	Bold/Italic font faces don't display in 19.33.1/i386
>
>Hi,
>  I am using version 19.33.1/i386 on a system running NT 4.0 Beta 2 and I still
>don't see bold or italic faces being displayed. This was also the case with the
>previous version I was running, 19.31.1.
>
>Is this a known problem?  
>
>For example, I set my default font to Truetype Courier New Regular 12pt:
>
>   (set-default-font
>         "-*-Courier New-normal-r-*-*-16-120-*-*-c-*-*-ansi-")
>
>but when I run the Edit/Text Properties/Display Faces function the font is
>rendered the same way for the italic, bold, and bold-italic font faces (and
>their colored variants)
>
>Moreover, while I can set the overall default font to a bold Courier, I cannot
>set it to italic Courier.
>
>
>-jerry
>
>
>
>
>

From owner-ntemacs-users@cs.washington.edu  Mon Jun 23 12:34:49 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Mon" "23" "June" "1997" "14:59:00" "-0400" "Skip Collins" "collins@aplcomm.jhuapl.edu" nil "27" "magic numbers for courier new bold and italic faces" "^From:" nil nil "6" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id MAA05418 for <voelker@june.cs.washington.edu>; Mon, 23 Jun 1997 12:34:49 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id MAA18752 for <voelker@joker.cs.washington.edu>; Mon, 23 Jun 1997 12:34:48 -0700
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id LAA20397 for ntemacs-users-outgoing; Mon, 23 Jun 1997 11:59:09 -0700 (PDT)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id LAA20393 for <ntemacs-users@trout.cs.washington.edu>; Mon, 23 Jun 1997 11:59:06 -0700 (PDT)
Received: from mailer.jhuapl.edu (mailer.jhuapl.edu [128.244.198.31]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id LAA01837 for <ntemacs-users@cs.washington.edu>; Mon, 23 Jun 1997 11:59:05 -0700
Received: from aplcomm.jhuapl.edu by mailer.jhuapl.edu (5.65/DEC-Ultrix/4.3) 	id AA14616; Mon, 23 Jun 1997 14:59:02 -0400
Received: by aplcomm.jhuapl.edu (5.0/SMI-SVR4) 	id AA13856; Mon, 23 Jun 1997 14:59:01 -0400
Message-Id: <Pine.SOL.3.91.970623143611.12098A-100000@aplcomm.jhuapl.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
From: Skip Collins <collins@aplcomm.jhuapl.edu>
Sender: owner-ntemacs-users@cs.washington.edu
To: ntemacs-users@cs.washington.edu
Subject: magic numbers for courier new bold and italic faces
Date: Mon, 23 Jun 1997 14:59:00 -0400 (EDT)

when i tried to enable bold and italic faces with courier new, using the 
faq instructions, it would not work. i kept getting error messages about 
not being able to find a font with the correct size. the faq gives the 
following font strings:

(set-face-font 'italic "-*-Courier New-normal-i-*-*-11-82-c-*-*-ansi-")
(set-face-font 'bold-italic "-*-Courier New-bold-i-*-*-11-82-c-*-*-ansi-")

i interpret this to specify courier new at 8.2pt, 11 pixels high. these 
are not valid numbers for my windows video and font settings. so, 
following some instructions earlier in the faq about determining the 
string for a particular windows font, i executed

(insert (prin1-to-string (win32-select-font))) 

in the *scratch* buffer. when i chose courier new italic at 8pt, the 
following string resulted

"-*-Courier New-normal-i-*-*-13-78-*-*-c-*-*-ansi-".

since i replaced the 11 pixels, 8.2pt setting with 13 pixels, 7.8pt in
default-frame-alist in .emacs, i can now use bold, italic and bold-italic
variations of courier-new. there is no need to set-face-font for italic or
bold-italic as the faq states. i expect that the correct pixel/point
combination will depend on the current video resolution. 

skip collins

