Subject: Re: more font stuff

From: Andrew Innes <[email-masked]>
Date: Fri, 31 Jan 1997 15:44:51 GMT

On 31 Jan 1997 10:15:11 -0500, Rich Pieri <[email-masked]> said:
>>>>>>"AI" == Andrew Innes <[email-masked]> writes:
>
AI>For some reason, Windows seems very particular about the requested font
AI>weight matching precisely - if you ask for a named font in bold when it
AI>is really demibold, Windows ignores it and returns Courier instead.
>
>Yes, it is... and when I specify demibold (or just "bold") I get a "No
>matching fonts are the same height as the frame default font" error.

The error message you are getting is misleading: it is not the _height_
of the font that has to match the frame setting, but the _width_.  In
fact, with (setq win32-enable-italics t), I can use Courier New where
the italic face is a pixel taller than the other faces - if I disallow
italics, the line height decreases by one pixel, showing that Emacs
compensates for different font heights on the same frame.

>I do not get this error when I specify semibold, but I do not get bold,
>either.

If the weight isn't recognised, it is treated as if it were unspecified
- in this case it presumably selects the normal weight.

>Oddly enough, I can use Courier New bold without any problems, aside
>from the fact that it is ugly as sin.

Courier New has the unusual (for Windows fonts) property that all face
variations (italic, bold and bold-italic) have the same cell width.
(The cell height for the italic face is inexplicably one pixel larger
than the others, although the glyphs have the same bounding box, but
that's another matter.)

If the Lucida Sans Typerwriter semibold face really is wider than the
normal face, then you can't use it unfortunately.  Someday I'd like to
rework the font selection and display mechanism to allow this sort of
thing to work, but I suspect that's a big job - in my experience these
things _always_ end up taking far longer to sort out than you'd expect,
at least when dealing with Emacs.

AndrewI

---

From: Rich Pieri <[email-masked]>
Date: 31 Jan 1997 10:15:11 -0500

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "AI" == Andrew Innes <[email-masked]> writes:

AI> For some reason, Windows seems very particular about the requested font
AI> weight matching precisely - if you ask for a named font in bold when it
AI> is really demibold, Windows ignores it and returns Courier instead.

Yes, it is... and when I specify demibold (or just "bold") I get a "No
matching fonts are the same height as the frame default font" error.  I
do not get this error when I specify semibold, but I do not get bold,
either.

-- 
Rich Pieri <[email-masked]> | Warning: pregnant women, the
Prescient Technologies, Inc.              | elderly, and children under 10
A Stone & Webster Company                 | should avoid prolonged exposure to
I speak for myself, not PTI or SWEC       | Happy Fun Ball.

---

From: Andrew Innes <[email-masked]>
Date: Fri, 31 Jan 1997 11:52:14 GMT

On 30 Jan 1997 21:39:57 -0500, Rich Pieri <[email-masked]> said:
>Okay, I never bothered to bring this up because it just wasn't that
>important.  My own monospaced font of choice is Lucida Sans Typewriter,
>a nice, sans-serif, TrueType font.  It has semibold and oblique faces.
>Oblique works fine; semibold appears as the normal face, that is, not
>bold at all.

You shoule be able to correct this manually, by overriding the bold face
to specify the weight as demibold (*) rather than bold.  Eg.

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

or something similar.

For some reason, Windows seems very particular about the requested font
weight matching precisely - if you ask for a named font in bold when it
is really demibold, Windows ignores it and returns Courier instead.

AndrewI

(*) The font spec parsing code only accepts "demibold" but will print it
out as "semibold" - I'll correct it to accept either for next release.

---

From: Rich Pieri <[email-masked]>
Date: 30 Jan 1997 21:39:57 -0500

-----BEGIN PGP SIGNED MESSAGE-----

I would really like to get it working, because it is one of the nicest
monospaced fonts I have seen, and it is a TrueType font.

-- 
Rich Pieri <[email-masked]> | Happy Fun Ball contains a liquid
Prescient Technologies, Inc.              | core, which, if exposed due to
A Stone & Webster Company                 | rupture, should not be touched,
I speak for myself, not PTI or SWEC       | inhaled, or looked at.