emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Special Characters on Mac Emacs


From: YAMAMOTO Mitsuharu
Subject: Re: Special Characters on Mac Emacs
Date: Wed, 23 Mar 2005 20:20:59 +0900
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)

>>>>> On Thu, 10 Mar 2005 10:18:02 -0600, Ulrich Hobelmann <address@hidden> 
>>>>> 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
                                address@hidden

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");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]