From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.bugs Subject: bug#5503: Font choice in Emacs 23 does not match weight/traits Date: Sun, 31 Jan 2010 23:44:49 -0500 Message-ID: <5E320729-F909-4BEA-ACD1-0A23E35552A7@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-30--1070518629" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1265000258 1952 80.91.229.12 (1 Feb 2010 04:57:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2010 04:57:38 +0000 (UTC) To: 5503@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 01 05:57:36 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NboLv-0006WG-E0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Feb 2010 05:57:35 +0100 Original-Received: from localhost ([127.0.0.1]:57586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NboLu-00071S-BO for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Jan 2010 23:57:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NboLo-00070t-7V for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:57:28 -0500 Original-Received: from [199.232.76.173] (port=56783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NboLm-00070l-SK for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:57:26 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NboLk-00053z-LZ for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:57:26 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48110) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NboLk-00053v-Cn for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:57:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NboAk-0000OS-3Z; Sun, 31 Jan 2010 23:46:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: David Reitter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2010 04:46:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5503 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.12649995091486 (code B ref -1); Mon, 01 Feb 2010 04:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Feb 2010 04:45:09 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nbo9t-0000Nv-Gh for submit@debbugs.gnu.org; Sun, 31 Jan 2010 23:45:09 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nbo9p-0000NI-Dt for submit@debbugs.gnu.org; Sun, 31 Jan 2010 23:45:08 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:38509 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nbo9m-0006Au-7I for submit@debbugs.gnu.org; Sun, 31 Jan 2010 23:45:02 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nbo9h-0004Bp-7q for submit@debbugs.gnu.org; Sun, 31 Jan 2010 23:45:01 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:51236) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nbo9h-0004Bl-33 for submit@debbugs.gnu.org; Sun, 31 Jan 2010 23:44:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nbo9g-0002ly-KA for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:44:56 -0500 Original-Received: from [199.232.76.173] (port=45886 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nbo9g-0002lY-8w for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:44:56 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nbo9f-0004BP-9a for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:44:56 -0500 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:47245) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nbo9f-0004B9-0M for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2010 23:44:55 -0500 Original-Received: by vws8 with SMTP id 8so1443395vws.0 for ; Sun, 31 Jan 2010 20:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-pgp-agent:x-mailer; bh=IPQ7W0FRBytrpOX8AtSbrFn6Qj4+oityNPuGxpyhHZ8=; b=ro0EwAhltBqxbczF9WVuRwZM8dnU9XecaHIrRaT7YFKWOYyhm15GDUxRkE1eoYICz1 BKa5rqhF6zmpNACH0SGh7bJXn7RKv7ZQXw7syzX96unzuNnEoUCzvZEW1Ul8gvapI+f+ xjJZOt1TaUMbMEEeASZyDh8J+k5NnojRt+KbQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-pgp-agent:x-mailer; b=jNE3LxXQcLQRJ2i5e+nqyldnstqPlb7H+1hbRiYoByyKTZyyVP4HPbippuG0SXnq8U 9axwby1gRWbILB9qhrLHqFc4RpWBSBCW/5fuEdKHf5XARiptqTSLW3ViXuxClqBSDIAv KMvYaz6Q7EVrt/xiQ/tQvKkW6d89FuluVRdig= Original-Received: by 10.220.122.26 with SMTP id j26mr4959707vcr.62.1264999493758; Sun, 31 Jan 2010 20:44:53 -0800 (PST) Original-Received: from ?192.168.1.42? (pool-96-236-181-152.pitbpa.east.verizon.net [96.236.181.152]) by mx.google.com with ESMTPS id 32sm45453205vws.19.2010.01.31.20.44.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 31 Jan 2010 20:44:53 -0800 (PST) X-Pgp-Agent: GPGMail 1.2.3 X-Mailer: Apple Mail (2.1077) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 31 Jan 2010 23:46:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34832 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-30--1070518629 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The fonts chosen for non-latin (here: Asian) characters are not very = similar to the face font. For example, if "Lucida Grande" is selected as the frame's default font, = the following: DOUBLET=E3=81=AF=E3=81=82=E3=81=AA=E3=81=9F=E3=81=A8->=E4=B8=96 = =E7=95=8C=E3=82=92=E3=81=A4=E3=81=AA=E3=81=92=E3=82=8B=E7=BF=BB=E8=A8=B3=E4= =BC=9A=E7=A4=BE=E3=81=A7=E3=81=99=E3=80=82 is displayed using a much to lightweight (skinny) font for all the = non-Latin glyphs. The Hiragana portion at the beginning is set in = PMingLiU, while the Kanji (Han script) is displayed in LiSung. These fonts appear very thin compared to the Latin text. This is despite there being the "Osaka" font present on my system, which = is a medium-weight, very suitable font. -apple-PMingLiU-medium-normal-normal-*-13-*-*-*-p-0-iso10646-1 (#x303) -apple-Apple_LiSung-medium-normal-normal-*-13-*-*-*-p-0-iso10646-1 = (#x7CD) This is under NS, whereas I am not positive that this is actually due to = NS. This worked great on Emacs 22 - Osaka is chosen there [well, I have = tried with Aquamacs]. I have received concrete complaints from users who say that they're not = using Emacs 23 because of that. =20 The user also said that matching the font according to further traits = (serif/sans) would be desirable/expected. I advised the user of setting Osaka directly (which works), and of = fontsets (which appear inappropriate for such simple use-cases in 2010). For what it's worth, I have been trying to fix this myself. So far I know that Osaka has 95% "han" script coverage and is returned = among the list of (many) fonts in the font driver's "list" function. It seems that exact weight and more specific traits are not being made = available to Emacs by the NS font driver (e.g., nsfont.m:532, call to = ns_descriptor_to_entity, last argument is NULL). Font weight should go = into "ADSTYLE", which is one matching criterion in font_find_for_lface. = font_select_entity() presumably doesn't have enough weight information. ns_descriptor_to_entity() sets weight, but only to Qbold and Qmedium. = If I comment some code in: FONT_SET_STYLE (font_entity, FONT_WEIGHT_INDEX, make_number (100 + 100 * ns_attribute_fvalue (desc, = NSFontWeightTrait))); .. then the "han" portion in the above examples is rendered with a = matching font (LiGothic), but not any of the Hiragana text (still in = PMingLiU). FWIW, the AppKit port of 23 shows the same behavior as NS. Again, Emacs 22 got it right - unfortunately I haven't managed to figure = out how the Emacs 22 code works.= --Apple-Mail-30--1070518629 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.12 (Darwin) iEYEARECAAYFAktmXEIACgkQYotoJUVQB4L5ZgCgiXX/BU67LsPyI8LrIYfk5SUT g/QAnjX0qh/33pDCdzKEi4oy2yWJ0PrL =nlxx -----END PGP SIGNATURE----- --Apple-Mail-30--1070518629--