all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Cc: "Ng, Andrew" <anng@ptc.com>
Subject: Re: Emacs 22.1 Windows ClearType Support
Date: Thu, 22 Nov 2007 23:35:45 -0500	[thread overview]
Message-ID: <E1IvQGX-0007Ls-QV@fencepost.gnu.org> (raw)
In-Reply-To: <A69AA663CE9BBC44AE1DA72483DE15DE09AACFEB@HQ-MAIL3.ptcnet.ptc.com> (anng@ptc.com)

If people decide to install this, we should ask Andrew to sign
a disclaimer for it.

Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C82D1F.7AB72653"
Date: Thu, 22 Nov 2007 10:51:24 -0500
Message-ID: <A69AA663CE9BBC44AE1DA72483DE15DE09AACFEB@HQ-MAIL3.ptcnet.ptc.com>
Thread-Topic: Emacs 22.1 Windows ClearType Support
Thread-Index: AcgtH4jh8q9WrvztS6uHkPEgf4wmYg==
From: "Ng, Andrew" <anng@ptc.com>
To: <bug-gnu-emacs@gnu.org>
Subject: Emacs 22.1 Windows ClearType Support

This is a multi-part message in MIME format.

------_=_NextPart_001_01C82D1F.7AB72653
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I have been having a go at fixing up the issues related to ClearType in
Emacs 22.1.

I think I have pretty much sorted out the major issues and everything
appears to work fine now. I've tried as much as possible not to alter
the non-ClearType code path.

I've also added an environment variable "EMACS_CLEARTYPE". If present
this will disable ClearType if its value is 0 and will enable ClearType
if its value is non-zero. Otherwise, ClearType is enabled according to
the system settings.

I've attached a patch file for my changes.

Thank you.

Regards,

Andrew Ng

------_=_NextPart_001_01C82D1F.7AB72653
Content-Type: application/octet-stream;
	name="patchfile"
Content-Transfer-Encoding: base64
Content-Description: patchfile
Content-Disposition: attachment;
	filename="patchfile"

ZGlmZiAtdSBlbWFjcy0yMi4xLW9yaWcvc3JjL2Rpc3BuZXc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JsZWQsIDApCi0gICAgICAmJiBzbW9vdGhpbmdfZW5h
YmxlZAotICAgICAgJiYgU3lzdGVtUGFyYW1ldGVyc0luZm8gKFNQSV9HRVRGT05UU01PT1RISU5H
VFlQRSwgMCwgJnNtb290aGluZ190eXBlLCAwKQotICAgICAgJiYgc21vb3RoaW5nX3R5cGUgPT0g
RkVfRk9OVFNNT09USElOR0NMRUFSVFlQRTsKKyAgICAgIGVudiA/IChhdG9pKGVudikgIT0gMCkg
OgorICAgICAgICAoU3lzdGVtUGFyYW1ldGVyc0luZm8gKFNQSV9HRVRGT05UU01PT1RISU5HLCAw
LCAmc21vb3RoaW5nX2VuYWJsZWQsIDApCisgICAgICAgICAmJiBzbW9vdGhpbmdfZW5hYmxlZAor
ICAgICAgICAgJiYgU3lzdGVtUGFyYW1ldGVyc0luZm8gKFNQSV9HRVRGT05UU01PT1RISU5HVFlQ
RSwgMCwgJnNtb290aGluZ190eXBlLCAwKQorICAgICAgICAgJiYgc21vb3RoaW5nX3R5cGUgPT0g
RkVfRk9OVFNNT09USElOR0NMRUFSVFlQRSk7CiAgIH0KIH0KIAo=

------_=_NextPart_001_01C82D1F.7AB72653--

  parent reply	other threads:[~2007-11-23  4:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-22 15:51 Emacs 22.1 Windows ClearType Support Ng, Andrew
2007-11-22 21:39 ` Jason Rumney
2007-11-22 21:43 ` Juanma Barranquero
2007-11-22 21:55   ` Drew Adams
2007-11-22 22:06     ` Jason Rumney
2007-11-22 22:24       ` Ng, Andrew
2007-11-22 22:47         ` Drew Adams
2007-11-22 21:58   ` Jason Rumney
2007-11-22 22:07     ` Juanma Barranquero
2007-11-23  4:35 ` Richard Stallman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-23  9:46 Angelo Graziosi

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

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

  git send-email \
    --in-reply-to=E1IvQGX-0007Ls-QV@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=anng@ptc.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.