From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JunJie Nan Newsgroups: gmane.emacs.devel Subject: Re: A patch for enforcing double-width CJK character display Date: Mon, 28 Apr 2014 13:35:03 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=bcaec51dd551a0ffd804f813ae40 X-Trace: ger.gmane.org 1398663344 29640 80.91.229.3 (28 Apr 2014 05:35:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2014 05:35:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 28 07:35:36 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WeeE4-0008Ka-30 for ged-emacs-devel@m.gmane.org; Mon, 28 Apr 2014 07:35:36 +0200 Original-Received: from localhost ([::1]:41848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeeE3-0002h0-MR for ged-emacs-devel@m.gmane.org; Mon, 28 Apr 2014 01:35:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeeDv-0002fF-Ik for emacs-devel@gnu.org; Mon, 28 Apr 2014 01:35:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WeeDu-0008UF-7b for emacs-devel@gnu.org; Mon, 28 Apr 2014 01:35:27 -0400 Original-Received: from mail-vc0-x22f.google.com ([2607:f8b0:400c:c03::22f]:65266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeeDt-0008Ty-Ug for emacs-devel@gnu.org; Mon, 28 Apr 2014 01:35:26 -0400 Original-Received: by mail-vc0-f175.google.com with SMTP id lh4so745985vcb.20 for ; Sun, 27 Apr 2014 22:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=IQnMCJ36jsTFMzFN6bn8JXELkVXKFKNARvU6gysMadM=; b=AignXaC3+vJ6txRpExIfsjB67g+4l7ht0yMHO2cUUA6rpBsXHXSyhu5jyzDOu9TJkN GVwHFD2v9p63KDnLclOuQXjSQwrStoFO35AjRCPVhiO6nSoZorZ0UjmW3vNH0Iiu+AwX z4UL0R4wIwUgYK+owZkukdCvd1/2EuuUvBjoS06A7tZC3fJVXE8FwEQ5mDngGicAsDni ew5G9vp8IFdOQDgR5VBN3HGLNaZGwcr1yKZ1AyF9h5tsGEkFTOy2zZO/gkt8/H149w6d WPFeV0Yjkbq7fThQ6tCbki0ExZA1YU3BcfxR1Tt/4zzpj+PJnmFf5eXsoBkHLRnqHVj7 Wh+Q== X-Received: by 10.52.128.231 with SMTP id nr7mr18708563vdb.17.1398663324689; Sun, 27 Apr 2014 22:35:24 -0700 (PDT) Original-Received: by 10.58.135.33 with HTTP; Sun, 27 Apr 2014 22:35:03 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c03::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171640 Archived-At: --bcaec51dd551a0ffd804f813ae40 Content-Type: multipart/alternative; boundary=bcaec51dd551a0ffd404f813ae3e --bcaec51dd551a0ffd404f813ae3e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Do not know why the patch is still not installed, although from the discussion thread nobody oppose it indeed. Below is an updated version based on current stream. It still works well. --=20 Cheers Jun Jie Nan =E2=88=A7 =E2=88=A7=EF=B8=B5 =E3=83=9F^=C5=8D^=E3=83=9F=E7=81=AC)=EF=BD=9E --bcaec51dd551a0ffd404f813ae3e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Do not know why the patch is still not installed, alt= hough from the discussion thread nobody oppose it indeed.

Belo= w is an updated version based on current stream. It still works well.

--
Cheers
Jun Jie Nan
=C2=A0 =E2=88=A7 =E2=88=A7=EF= =B8=B5
=C2=A0=E3=83=9F^=C5=8D^=E3=83=9F=E7=81=AC)=EF=BD=9E
--bcaec51dd551a0ffd404f813ae3e-- --bcaec51dd551a0ffd804f813ae40 Content-Type: text/x-patch; charset=US-ASCII; name="emacs_src_xftfont.patch" Content-Disposition: attachment; filename="emacs_src_xftfont.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hujc05dh0 ZGlmZiAtLWdpdCBhL3NyYy94ZnRmb250LmMgYi9zcmMveGZ0Zm9udC5jCmluZGV4IDE4YzE4MGYu LjIwMjBiNGYgMTAwNjQ0Ci0tLSBhL3NyYy94ZnRmb250LmMKKysrIGIvc3JjL3hmdGZvbnQuYwpA QCAtNjAsNiArNjAsOCBAQCBzdHJ1Y3QgeGZ0Zm9udF9pbmZvCiAgIERpc3BsYXkgKmRpc3BsYXk7 CiAgIFhmdEZvbnQgKnhmdGZvbnQ7CiAgIHVuc2lnbmVkIHhfZGlzcGxheV9pZDsKKyAgc3RydWN0 IGZyYW1lICpmcmFtZTsgLyogaG9sZCBmcmFtZSBwdHIsIGNqayBkb3VibGUgd2lkdGggZml4IG5l ZWQgaXQgKi8KKyAgaW50IGlzX2NqazsgLyogRmxhZyB0byB0ZWxsIGlmIGl0IGlzIENKSyBmb250 IG9yIG5vdC4gKi8KIH07CiAKIC8qIFN0cnVjdHVyZSBwb2ludGVkIGJ5IChzdHJ1Y3QgZmFjZSAq KS0+ZXh0c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oYWxmX3dpZHRoX2NqaykKKyAgICAqaGFsZl93aWR0aF9jamsg PSAwOworCisgIGlmKCBkZWZhdWx0X3dpZHRoID09IDAgfHwgLyogc29tZXRoaW5nIHdyb25nICov CisgICAgICBkZWZhdWx0X3dpZHRoID09IC0xIHx8IC8qIGRlZmF1bHQgZm9udCBpcyBub3QgbW9u b3NwYWNlICovCisgICAgICBjaGFyX3dpZHRoID09IGRlZmF1bHRfd2lkdGgpIC8qIGFscmVhZHkg Z29vZCAqLworICAgIHJldHVybiAwOworICBpZiggY2hhcl93aWR0aCA8IGRlZmF1bHRfd2lkdGgp IHsgCisgICAgLyogYWxtb3N0IGltcG9zc2libGUsIGJ1dCB3ZSBjYW4gaGFuZGxlIGl0ICovCisg ICAgcGFkZGluZyA9IGRlZmF1bHRfd2lkdGggLSBjaGFyX3dpZHRoOworICAgIGlmKGhhbGZfd2lk dGhfY2prKQorICAgICAgICAqaGFsZl93aWR0aF9jamsgPSAxOworICB9IGVsc2UgLyogZ2V0IHRo ZSBwYWRkaW5nLCBhbGwgY2prIHN5bWJvbHMgaXMgRE9VQkxFIHdpZHRoICovCisgICAgcGFkZGlu ZyA9IGRlZmF1bHRfd2lkdGggKiAyIC0gY2hhcl93aWR0aDsKKyAgLyogMSwgU29tZSBvbGQgQ0pL IHBjZiBmb250cyBtYXkgYmlnZ2VyIHRoYW4gMipkZWZhdWx0X3dpZHRoLgorICAgICAyLCBVc2Vy IG1heSBzZXQgYSB2ZXJ5IGJpZyBmb250IHNpemUgZm9yIHNjcmlwdCBIQU4gbWFudWFsbHkuCisg ICAgIEtlZXAgaXQgdW5jaGFuZ2VkLCBOT1QgYWRqdXN0IGRlZmF1bHQgZm9udCB3aWR0aC4gKi8K KyAgcmV0dXJuIChwYWRkaW5nID4gMCAmJiBwYWRkaW5nIDwgZGVmYXVsdF93aWR0aCkgPyBwYWRk aW5nIDogMDsgICAgICAgICAgICAgICAgICAKK30KKworLyogR2V0IHRoZSBmb250IHdpZHRoIG9m I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aWR0aCA9PSAtMSkgLyogbm90IGNqayBvciBkZWZhdWx0IG5vdCBt b25vc3BhY2UgKi8gCisgICAgICAgIFhmdERyYXdHbHlwaHMgKHhmdF9kcmF3LCAmZmcsIHhmdGZv bnRfaW5mby0+eGZ0Zm9udCwgeCwgeSwgY29kZSwgbGVuKTsKKyAgICAgIGVsc2UgLyogZHJhdyBD SksgZ2x5cGhzIG9uZSBieSBvbmUgYW5kIGFkanVzdCB0aGUgb2Zmc2V0ICovCisgICAgICAgICBm b3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKKyAgICAgICAgICAgaW50IGNqa19wYWRkaW5nID0g MDsKKyAgICAgICAgICAgaW50IG9mZnNldCA9IDA7CisgICAgICAgICAgIGludCBoYWxmX3dpZHRo X2NqayA9IDA7CisgICAgICAgICAgIFhHbHlwaEluZm8gZXh0ZW50czsKKyAgICAgICAgICAgWGZ0 R2x5cGhFeHRlbnRzICh4ZnRmb250X2luZm8tPmRpc3BsYXksIHhmdGZvbnRfaW5mby0+eGZ0Zm9u dCwgY29kZStpLCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICZleHRlbnRzKTsKKyAg ICAgICAgICAgY2prX3BhZGRpbmcgPSB4ZnRmb250X2dldF9jamtfcGFkZGluZyhkZWZhdWx0X3dp ZHRoLGV4dGVudHMueE9mZiwgJmhhbGZfd2lkdGhfY2prKTsKKyAgICAgICAgICAgaWYoY2prX3Bh ZGRpbmcpIAorICAgICAgICAgICAgIG9mZnNldCA9IGRlZmF1bHRfd2lkdGggKiBpICogKGhhbGZf d2lkdGhfY2prID8gMSA6IDIpICsgKGNqa19wYWRkaW5nPj4xKTsKKyAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgIG9mZnNldCA9IGV4dGVudHMueE9mZiAqIGk7IAorICAgICAgICAgICBYZnRE cmF3R2x5cGhzICh4ZnRfZHJhdywgJmZnLCB4ZnRmb250X2luZm8tPnhmdGZvbnQsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgeCtvZmZzZXQsIHksIGNvZGUraSwgMSk7CisgICAgICAgICB9 CisgIH0KKwogICB1bmJsb2NrX2lucHV0ICgpOwogCiAgIHJldHVybiBsZW47Cg== --bcaec51dd551a0ffd804f813ae40--