unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Abrahams <dave@boost-consulting.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PING] ClearType Patch
Date: Wed, 08 Jun 2005 15:57:36 -0400	[thread overview]
Message-ID: <u4qc84o5r.fsf@boost-consulting.com> (raw)
In-Reply-To: <u3brsaeu1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Jun 2005 21:22:30 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Abrahams <dave@boost-consulting.com>
>> Cc: emacs-devel@gnu.org
>> Date: Wed, 08 Jun 2005 11:46:58 -0400
>> 
>> Sorry, but I have a lot on my plate, so once I start waiting a few
>> more days it's likely to drop off my radar screen.
>
> We all need to cope with this.

I know.  If it drops off my radar and off your radar, it's really
gone, isn't it?  ;->

Look, I wasn't rude (I don't think) and everyone is free to ignore me
if they need to.

>> Agreed, but I think the use of -D_WIN32_WINNT=0x0400 on the compiler
>> command-line may be similarly bad (and is the reason I transcribed
>> those constants).
>
> Jason, could you perhaps tell why this compiler switch is used?  If
> that is because we don't want to use features that are unavailable in
> older versions of Windows, we could replace that with run-time checks,
> like the one I suggest below, can't we?

Seems like a good idea to get a compiler error if possible.  OTOH it
does make using more advanced features, even when protected by runtime
checks, unreasonably difficult and messy.  Also the name _WIN32_WINNT
is reserved to the implementation and unless we're given specific
permission to #define it, doing so is ill.  FWIW.  I don't know
whether that permission is granted for _WIN32_WINNT.

>> SPI_GETFONTSMOOTHING
>> 
>>   This one is in fact available for _WIN32_WINNT == 0x400; I should
>>   have used it directly.
>> 
>> SPI_GETFONTSMOOTHINGTYPE
>> FE_FONTSMOOTHINGCLEARTYPE
>> 
>>   These two are only enabled for _WIN32_WINNT >= 0x0501
>> 
>> 
>> > where they are defined,
>> 
>> WinUser.h, IIRC
>
> The MinGW version of winuser.h doesn't have them; perhaps that's a
> MinGW bug.  So I think we need to condition the code on
> SPI_GETFONTSMOOTHINGTYPE being defined, or perhaps provide a fallback
> definition in src/s/ms-w32.h for MinGW.

The latter seems better.  Why should people who get a MinGW-compiled
executable suffer ugly characters?

>> > Finally, MSDN seems to indicate that SPI_GETFONTSMOOTHINGTYPE is
>> > unsupported on Windows 9x, so it sounds like your code should be
>> > disabled for those versions of Windows.
>> 
>> Right, I should use an #ifdef _WIN32_WINNT >= 0x0501 ... except of
>> course that the build process subverts that by forcing _WIN32_WINNT to
>> 0x400.
>
> I meant a run-time check, not a compile-time check (because Emacs
> built on XP could then be run on Windows 98, for example: think binary
> releases).  

Ah, of course.  But on second thought, I considered this question when
I wrote the code. The calls will return an error on Win98 anyway
because the constants are unsupported, and most of the code will be
skipped.  Unless you're concerned about optimizing away the call into
Windows altogether (which I'm guessing is not worth the complication),
you don't need an explicit check.

> We have a global variable os_subtype which can be used for such a
> run-time test, I think.

When we settle what to do about the #defines I will submit a new
patch...

>> > A ChangeLog entry for the patches would also be nice, btw.
>> 
>> I will be happy to write one.  I assume the format to follow is used
>> in the ChangeLog file at the top of emacs' CVS tree?
>
> Yes.  And in addition, the GNU Coding Standards (standards.texi) which
> you can find on the GNU Web site, has a section about writing
> ChangeLog entries.

...including one for the ChangeLog

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

  reply	other threads:[~2005-06-08 19:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 12:38 Emacs defeats ClearType David Abrahams
2005-06-03  8:30 ` jasonr
2005-06-03 10:54   ` David Abrahams
2005-06-03 15:22     ` jasonr
2005-06-03 15:27   ` David Abrahams
2005-06-06 15:47     ` jasonr
2005-06-06 16:46       ` David Abrahams
2005-06-07  1:15         ` Miles Bader
2005-06-07 13:20           ` David Abrahams
2005-06-08 13:45         ` [PING] ClearType Patch David Abrahams
2005-06-08 14:33           ` Eli Zaretskii
2005-06-08 15:46             ` David Abrahams
2005-06-08 16:44               ` Stefan Monnier
2005-06-08 20:01                 ` David Abrahams
2005-06-08 18:22               ` Eli Zaretskii
2005-06-08 19:57                 ` David Abrahams [this message]
2005-06-08 21:29                   ` jasonr
2005-06-08 21:23                 ` jasonr
2005-06-08 22:17                   ` David Abrahams
2005-06-09  8:10                     ` jasonr
2005-06-11 13:12                       ` Eli Zaretskii
2005-06-11 16:50                         ` David Abrahams
2005-06-15  7:15                           ` David Abrahams
2005-06-15  9:19                             ` David Abrahams
2005-06-18 23:02                               ` How is highlighting done in show-paren-mode? David Abrahams
2005-07-14 18:55                                 ` Who can explain the display architecture? David Abrahams
2005-07-15  9:41                                   ` Kim F. Storm
2005-06-08 23:34                   ` [PING] ClearType Patch Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u4qc84o5r.fsf@boost-consulting.com \
    --to=dave@boost-consulting.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).