emacs-devel
[Top][All Lists]
Advanced

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

Re: fonts in carbon emacs


From: YAMAMOTO Mitsuharu
Subject: Re: fonts in carbon emacs
Date: Wed, 13 Jul 2005 18:22:22 +0900
User-agent: Wanderlust/2.14.0 (Africa) 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 Sun, 03 Jul 2005 21:15:42 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

> A workaround is to customize "fontset-default" as follows:

>   (fontset-add-mac-fonts "fontset-default" "monaco")

> But it has some drawbacks that 1) It does harm to ETL font users,

On second thought, this is not related to users who don't use these
fonts.  So we can do like (unless (x-list-fonts "*-iso8859-1")
(fontset-add-mac-fonts ...)).

> and 2) Font family for Central-European/Cyrillic fonts are not
> synchronized with that for the ASCII (or mac-roman) font.

This issue would be eased by making the font family matching slightly
more flexible as follows (the change is for Mac only):

Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.330
diff -c -r1.330 xfaces.c
*** src/xfaces.c        11 Jul 2005 14:28:21 -0000      1.330
--- src/xfaces.c        13 Jul 2005 08:36:08 -0000
***************
*** 6745,6758 ****
      nfonts = try_alternative_families (f, try_family, registry, fonts);
  
  #ifdef MAC_OS
!   /* When realizing the default face and a font spec does not matched
!      exactly, Emacs looks for ones with the same registry as the
!      default font.  On the Mac, this is mac-roman, which does not work
!      if the family is -etl-fixed, e.g.  The following widens the
!      choices and fixes that problem.  */
!   if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry)
!       && xstricmp (SDATA (registry), "mac-roman") == 0)
!     nfonts = try_alternative_families (f, try_family, Qnil, fonts);
  #endif
  
    if (EQ (try_family, family))
--- 6745,6765 ----
      nfonts = try_alternative_families (f, try_family, registry, fonts);
  
  #ifdef MAC_OS
!   if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry))
!     if (xstricmp (SDATA (registry), "mac-roman") == 0)
!       /* When realizing the default face and a font spec does not
!        matched exactly, Emacs looks for ones with the same registry
!        as the default font.  On the Mac, this is mac-roman, which
!        does not work if the family is -etl-fixed, e.g.  The
!        following widens the choices and fixes that problem.  */
!       nfonts = try_alternative_families (f, try_family, Qnil, fonts);
!     else if (SBYTES (try_family) > 0
!            && SREF (try_family, SBYTES (try_family) - 1) != '*')
!       /* Some Central European/Cyrillic font family names have the
!        Roman counterpart name as their prefix.  */
!       nfonts = try_alternative_families (f, concat2 (try_family,
!                                                    build_string ("*")),
!                                        registry, fonts);
  #endif
  
    if (EQ (try_family, family))

I've made these changes to the CVS, and now change of the height by
customize-face works for the "default" face.  They are still
workarounds and do not solve the problem mentioned in (*1), which is
not specific to Mac, but I think the situation has become better than
before.

(*1) http://lists.gnu.org/archive/html/emacs-devel/2005-07/msg00336.html

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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