From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Special Characters on Mac Emacs Date: Wed, 23 Mar 2005 20:20:59 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1111578049 2687 80.91.229.2 (23 Mar 2005 11:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2005 11:40:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 12:40:47 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DE4E2-0006md-5p for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 12:40:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE4VV-00013x-IP for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 06:58:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DE4KJ-0005KN-Ri for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:47:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DE4KG-0005HX-Gi for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:47:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE4KF-0005Ae-Ln for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:47:03 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DE3v2-00012O-AD for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:21:01 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 3EDAB1A6383; Wed, 23 Mar 2005 20:20:59 +0900 (JST) Original-To: Ulrich Hobelmann In-Reply-To: User-Agent: Wanderlust/2.12.2 (99 Luftballons) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:35033 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35033 >>>>> On Thu, 10 Mar 2005 10:18:02 -0600, Ulrich Hobelmann said: > To make Emacs display the stuff the following works: > (create-fontset-from-fontset-spec > "-apple-monaco-medium-r-normal--12-*-*-*-*-*-fontset-monaco, > ascii:-apple-monaco-medium-r-normal--12-120-75-75-m-120-mac-roman, (snip) > latin-iso8859-15:-apple-monaco-medium-r-normal--12-120-75-75-m-120-mac-roman, > latin-iso8859-1:-apple-monaco-medium-r-normal--12-120-75-75-m-120-mac-roman" > ) > (set-face-font 'default > "-apple-monaco-medium-r-normal--12-*-*-*-*-*-fontset-monaco") I'd rather not recommend directly specifying mac-roman fonts for latin-iso8859-1 or latin-iso8859-15 character set. Because mac-roman does not have all the characters for them, some characters are displayed with wrong glyph. If it had all, `face-font-registry-alternatives' would be set accordingly. (If you do not care about wrong glyph, the easiest way is to add (custom-set-variables '(face-font-registry-alternatives '(("iso8859-1" "mac-roman") ("iso8859-15" "mac-roman")))) to ~/.emacs. Then mac-roman fonts can be used in place of iso8859-1(15) fonts in many cases.) Maybe `create-fontset-from-mac-roman-font' or `fontset-add-mac-fonts' mentioned in http://lists.gnu.org/archive/html/emacs-devel/2004-12/msg00004.html would be of help. Also, the following patch makes "fontset-mac" a fallback fontset, and if one specifies a mac-roman font via the -fn option or preferences like % defaults write org.gnu.Emacs Emacs.font '-apple-lucida sans typewriter-medium-r-normal--14-*-75-75-m-*-mac-roman' then `create-fontset-from-mac-roman-font' is automatically used to augment the specified font with many accented characters. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp Index: lisp/term/mac-win.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v retrieving revision 1.35 diff -c -r1.35 mac-win.el *** lisp/term/mac-win.el 16 Mar 2005 03:23:34 -0000 1.35 --- lisp/term/mac-win.el 23 Mar 2005 10:43:45 -0000 *************** *** 1577,1583 **** (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) ;; Create a fontset from FONT. The fontset name is ;; generated from FONT. ! (create-fontset-from-ascii-font font resolved-name "startup")))) ;; Apply a geometry resource to the initial frame. Put it at the end ;; of the alist, so that anything specified on the command line takes --- 1577,1586 ---- (new-fontset font (x-complement-fontset-spec xlfd-fields nil)) ;; Create a fontset from FONT. The fontset name is ;; generated from FONT. ! (if (and (string= "mac" (aref xlfd-fields xlfd-regexp-registry-subnum)) ! (string= "roman" (aref xlfd-fields xlfd-regexp-encoding-subnum))) ! (create-fontset-from-mac-roman-font font resolved-name "startup") ! (create-fontset-from-ascii-font font resolved-name "startup"))))) ;; Apply a geometry resource to the initial frame. Put it at the end ;; of the alist, so that anything specified on the command line takes Index: src/macfns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/macfns.c,v retrieving revision 1.54 diff -c -r1.54 macfns.c *** src/macfns.c 16 Mar 2005 08:06:33 -0000 1.54 --- src/macfns.c 23 Mar 2005 10:43:45 -0000 *************** *** 2632,2637 **** --- 2632,2639 ---- font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"); /* If those didn't work, look for something which will at least work. */ if (! STRINGP (font)) + font = x_new_fontset (f, "-etl-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac"); + if (! STRINGP (font)) font = x_new_font (f, "-*-monaco-*-12-*-mac-roman"); if (! STRINGP (font)) font = x_new_font (f, "-*-courier-*-10-*-mac-roman"); *************** *** 3732,3737 **** --- 3734,3741 ---- font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"); /* If those didn't work, look for something which will at least work. */ if (! STRINGP (font)) + font = x_new_fontset (f, "-etl-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac"); + if (! STRINGP (font)) font = x_new_font (f, "-*-monaco-*-12-*-mac-roman"); if (! STRINGP (font)) font = x_new_font (f, "-*-courier-*-10-*-mac-roman");