* Fontset problem @ 2002-09-03 13:44 Andreas Schwab 2002-09-06 13:01 ` Kenichi Handa 0 siblings, 1 reply; 13+ messages in thread From: Andreas Schwab @ 2002-09-03 13:44 UTC (permalink / raw) I'd like to define a fontset that uses courier as the main font, but substitutes fixed for the three mule-unicode coding systems (because they are much more complete). Thus I defined the following fontset: Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ mule-unicode-2500-33ff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1,\ mule-unicode-e000-ffff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1,\ mule-unicode-0100-24ff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1 The problem is that characters in the mule-unicode coding systems are always using medium-r-normal style, even if they are supposed to be, say, bold. On the other hand, if I define the fontset in this way: Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ mule-unicode-2500-33ff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1,\ mule-unicode-e000-ffff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1,\ mule-unicode-0100-24ff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1 Emacs uses the first font that matches -*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1, which may not be the medium-r-normal style. What is the right way to define the fontset so that Emacs uses the right style? Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-03 13:44 Fontset problem Andreas Schwab @ 2002-09-06 13:01 ` Kenichi Handa 2002-09-06 13:43 ` Andreas Schwab 0 siblings, 1 reply; 13+ messages in thread From: Kenichi Handa @ 2002-09-06 13:01 UTC (permalink / raw) Cc: emacs-devel In article <jer8gb192m.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > I'd like to define a fontset that uses courier as the main font, but > substitutes fixed for the three mule-unicode coding systems (because they > are much more complete). Thus I defined the following fontset: > Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > mule-unicode-2500-33ff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1,\ > mule-unicode-e000-ffff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1,\ > mule-unicode-0100-24ff:-*-fixed-medium-r-normal--*-140-*-*-*-*-iso10646-1 > The problem is that characters in the mule-unicode coding systems are > always using medium-r-normal style, even if they are supposed to be, say, > bold. On the other hand, if I define the fontset in this way: > Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > mule-unicode-2500-33ff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1,\ > mule-unicode-e000-ffff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1,\ > mule-unicode-0100-24ff:-*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1 > Emacs uses the first font that matches > -*-fixed-*-*-*--*-140-*-*-*-*-iso10646-1, which may not be the > medium-r-normal style. What is the right way to define the fontset so > that Emacs uses the right style? If you specify an XLFD field other than FOUNDRY, FAMILY, CHARSET_REGISTRY, CHARSET_ENCODING in each font name, Emacs tries to use the specified font name as is (i.e. the same font X server will find from that name). In your case, you specify ADSTYLE as NULL and POINT_SIZE as 140. If you put `*' in those fields, Emacs's normal font selection mechanism should work also for those charsets. So, please try this: Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 --- Ken'ichi HANDA handa@etl.go.jp ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-06 13:01 ` Kenichi Handa @ 2002-09-06 13:43 ` Andreas Schwab 2002-09-26 8:10 ` Kenichi Handa 0 siblings, 1 reply; 13+ messages in thread From: Andreas Schwab @ 2002-09-06 13:43 UTC (permalink / raw) Cc: emacs-devel Kenichi Handa <handa@etl.go.jp> writes: |> So, please try this: |> |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 That does not work either, now Emacs is using courier instead of fixed for the mule-unicode charsets. I've also tried -*-fixed-*-iso10646-1, but that gave me the original problem back, which is kind of strange, because describe-fontset is displaying this pattern when I specify the pattern fully spelled out as above. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-06 13:43 ` Andreas Schwab @ 2002-09-26 8:10 ` Kenichi Handa 2002-09-26 13:35 ` Andreas Schwab 2002-09-26 14:06 ` Stefan Monnier 0 siblings, 2 replies; 13+ messages in thread From: Kenichi Handa @ 2002-09-26 8:10 UTC (permalink / raw) Cc: emacs-devel Sorry for the late response. In article <je4rd3qllv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > Kenichi Handa <handa@etl.go.jp> writes: > |> So, please try this: > |> > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 > That does not work either, now Emacs is using courier instead of fixed for > the mule-unicode charsets. Ah, I see. You actually have courier iso10646-1 fonts. Hmmm, currently, Emacs tries at first the family specified by face, and if you have that font, Emacs uses it. Perhaps, for finding a font or non-ASCII, non-Latin-1 chars, Emacs should prefer the family specified in the fontset to the family specified in the face. I've just installed this change. Please try it. At least it works for me with the above resource on the machine that has courier iso10646-1 fonts. Other people please check if it doesn't break your font/fontset setting. Font selection routine is one of very delicate parts. --- Ken'ichi HANDA handa@m17n.org 2002-09-26 Kenichi Handa <handa@etl.go.jp> * xfaces.c (try_font_list): New arg PREFER_FACE_FAMILY. If it is nonzero, try face's family at first. Otherwise try FAMILY at first. (choose_face_font): If C is a single byte char or latin-1, call try_font_list with PREFER_FACE_FAMILY 1. Index: xfaces.c =================================================================== RCS file: /cvs/emacs/src/xfaces.c,v retrieving revision 1.262 retrieving revision 1.263 diff -u -c -r1.262 -r1.263 cvs server: conflicting specifications of output style *** xfaces.c 13 Sep 2002 19:35:08 -0000 1.262 --- xfaces.c 26 Sep 2002 08:03:52 -0000 1.263 *************** *** 510,516 **** static int font_list P_ ((struct frame *, Lisp_Object, Lisp_Object, Lisp_Object, struct font_name **)); static int try_font_list P_ ((struct frame *, Lisp_Object *, ! Lisp_Object, Lisp_Object, struct font_name **)); static int try_alternative_families P_ ((struct frame *f, Lisp_Object, Lisp_Object, struct font_name **)); static int cmp_font_names P_ ((const void *, const void *)); --- 510,517 ---- static int font_list P_ ((struct frame *, Lisp_Object, Lisp_Object, Lisp_Object, struct font_name **)); static int try_font_list P_ ((struct frame *, Lisp_Object *, ! Lisp_Object, Lisp_Object, struct font_name **, ! int)); static int try_alternative_families P_ ((struct frame *f, Lisp_Object, Lisp_Object, struct font_name **)); static int cmp_font_names P_ ((const void *, const void *)); *************** *** 6324,6344 **** match. A value of nil means include fonts of any registry and encoding. Return in *FONTS a pointer to a vector of font_name structures for the fonts matched. Value is the number of fonts found. */ static int ! try_font_list (f, attrs, family, registry, fonts) struct frame *f; Lisp_Object *attrs; Lisp_Object family, registry; struct font_name **fonts; { int nfonts = 0; Lisp_Object face_family = attrs[LFACE_FAMILY_INDEX]; ! if (STRINGP (face_family)) ! nfonts = try_alternative_families (f, face_family, registry, fonts); #ifdef MAC_OS /* When realizing the default face and a font spec does not matched --- 6325,6352 ---- match. A value of nil means include fonts of any registry and encoding. + If PREFER_FACE_FAMILY is nonzero, perfer face's family to FAMILY. + Otherwise, prefer FAMILY. + Return in *FONTS a pointer to a vector of font_name structures for the fonts matched. Value is the number of fonts found. */ static int ! try_font_list (f, attrs, family, registry, fonts, prefer_face_family) struct frame *f; Lisp_Object *attrs; Lisp_Object family, registry; struct font_name **fonts; + int prefer_face_family; { int nfonts = 0; Lisp_Object face_family = attrs[LFACE_FAMILY_INDEX]; + Lisp_Object try_family; + + try_family = prefer_face_family ? face_family : family; ! if (STRINGP (try_family)) ! nfonts = try_alternative_families (f, try_family, registry, fonts); #ifdef MAC_OS /* When realizing the default face and a font spec does not matched *************** *** 6346,6357 **** 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 (face_family) && STRINGP (registry) && xstricmp (SDATA (registry), "mac-roman") == 0) ! nfonts = try_alternative_families (f, face_family, Qnil, fonts); #endif ! if (nfonts == 0 && !NILP (family)) nfonts = try_alternative_families (f, family, registry, fonts); /* Try font family of the default face or "fixed". */ --- 6354,6368 ---- 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 (! prefer_face_family) ! family = face_family; ! ! if (nfonts == 0 && STRINGP (family)) nfonts = try_alternative_families (f, family, registry, fonts); /* Try font family of the default face or "fixed". */ *************** *** 6425,6431 **** /* Get a list of fonts matching that pattern and choose the best match for the specified face attributes from it. */ ! nfonts = try_font_list (f, attrs, XCAR (pattern), XCDR (pattern), &fonts); width_ratio = (SINGLE_BYTE_CHAR_P (c) ? 1 : CHARSET_WIDTH (CHAR_CHARSET (c))); --- 6436,6444 ---- /* Get a list of fonts matching that pattern and choose the best match for the specified face attributes from it. */ ! nfonts = try_font_list (f, attrs, XCAR (pattern), XCDR (pattern), &fonts, ! (SINGLE_BYTE_CHAR_P (c) ! || CHAR_CHARSET (c) == charset_latin_iso8859_1)); width_ratio = (SINGLE_BYTE_CHAR_P (c) ? 1 : CHARSET_WIDTH (CHAR_CHARSET (c))); ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 8:10 ` Kenichi Handa @ 2002-09-26 13:35 ` Andreas Schwab 2002-09-26 14:06 ` Stefan Monnier 1 sibling, 0 replies; 13+ messages in thread From: Andreas Schwab @ 2002-09-26 13:35 UTC (permalink / raw) Cc: emacs-devel Kenichi Handa <handa@m17n.org> writes: |> Sorry for the late response. |> |> In article <je4rd3qllv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: |> |> > Kenichi Handa <handa@etl.go.jp> writes: |> > |> So, please try this: |> > |> |> > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ |> > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 |> |> > That does not work either, now Emacs is using courier instead of fixed for |> > the mule-unicode charsets. |> |> Ah, I see. You actually have courier iso10646-1 fonts. |> |> Hmmm, currently, Emacs tries at first the family specified |> by face, and if you have that font, Emacs uses it. |> |> Perhaps, for finding a font or non-ASCII, non-Latin-1 chars, |> Emacs should prefer the family specified in the fontset to |> the family specified in the face. |> |> I've just installed this change. Please try it. Thanks, it fixed the problem for me. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 8:10 ` Kenichi Handa 2002-09-26 13:35 ` Andreas Schwab @ 2002-09-26 14:06 ` Stefan Monnier 2002-09-26 14:20 ` Andreas Schwab 1 sibling, 1 reply; 13+ messages in thread From: Stefan Monnier @ 2002-09-26 14:06 UTC (permalink / raw) Cc: schwab, emacs-devel > Sorry for the late response. > > In article <je4rd3qllv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: > > > Kenichi Handa <handa@etl.go.jp> writes: > > |> So, please try this: > > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 > > > That does not work either, now Emacs is using courier instead of fixed for > > the mule-unicode charsets. > > Ah, I see. You actually have courier iso10646-1 fonts. > > Hmmm, currently, Emacs tries at first the family specified > by face, and if you have that font, Emacs uses it. > > Perhaps, for finding a font or non-ASCII, non-Latin-1 chars, > Emacs should prefer the family specified in the fontset to > the family specified in the face. I haven't seen the rest of the thread, so I don't know what problem you're trying to solve, but this seems wrong to me. If the face says "courier" then Emacs should use courier if it's available. The fontset's family should only be obeyed for faces that do not set the `family' property or when the face family cannot be found with the desired encoding. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:06 ` Stefan Monnier @ 2002-09-26 14:20 ` Andreas Schwab 2002-09-26 14:32 ` Stefan Monnier 0 siblings, 1 reply; 13+ messages in thread From: Andreas Schwab @ 2002-09-26 14:20 UTC (permalink / raw) Cc: Kenichi Handa, emacs-devel "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: |> > Sorry for the late response. |> > |> > In article <je4rd3qllv.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes: |> > |> > > Kenichi Handa <handa@etl.go.jp> writes: |> > > |> So, please try this: |> > > |> |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 |> > |> > > That does not work either, now Emacs is using courier instead of fixed for |> > > the mule-unicode charsets. |> > |> > Ah, I see. You actually have courier iso10646-1 fonts. |> > |> > Hmmm, currently, Emacs tries at first the family specified |> > by face, and if you have that font, Emacs uses it. |> > |> > Perhaps, for finding a font or non-ASCII, non-Latin-1 chars, |> > Emacs should prefer the family specified in the fontset to |> > the family specified in the face. |> |> I haven't seen the rest of the thread, See http://mail.gnu.org/pipermail/emacs-devel/2002-September/012110.html for the start of the thread. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:20 ` Andreas Schwab @ 2002-09-26 14:32 ` Stefan Monnier 2002-09-26 14:39 ` Andreas Schwab 0 siblings, 1 reply; 13+ messages in thread From: Stefan Monnier @ 2002-09-26 14:32 UTC (permalink / raw) Cc: Stefan Monnier, Kenichi Handa, emacs-devel > |> > > |> So, please try this: > |> > > |> > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 > |> > > |> > > That does not work either, now Emacs is using courier instead of fixed for > |> > > the mule-unicode charsets. Oh, so could it be that the `family' property of the `default' face should be `unspecified' rather than `courier' ? Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:32 ` Stefan Monnier @ 2002-09-26 14:39 ` Andreas Schwab 2002-09-26 14:40 ` Stefan Monnier 0 siblings, 1 reply; 13+ messages in thread From: Andreas Schwab @ 2002-09-26 14:39 UTC (permalink / raw) Cc: Kenichi Handa, emacs-devel "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: |> > |> > > |> So, please try this: |> > |> > > |> |> > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ |> > |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 |> > |> > |> > |> > > That does not work either, now Emacs is using courier instead of fixed for |> > |> > > the mule-unicode charsets. |> |> Oh, so could it be that the `family' property of the `default' face |> should be `unspecified' rather than `courier' ? ??? But I want courier, not something unspecified. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:39 ` Andreas Schwab @ 2002-09-26 14:40 ` Stefan Monnier 2002-09-26 14:42 ` Andreas Schwab 0 siblings, 1 reply; 13+ messages in thread From: Stefan Monnier @ 2002-09-26 14:40 UTC (permalink / raw) Cc: Stefan Monnier, Kenichi Handa, emacs-devel > "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: > > |> > |> > > |> So, please try this: > |> > |> > > |> > |> > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > |> > |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 > |> > |> > > |> > |> > > That does not work either, now Emacs is using courier instead of fixed for > |> > |> > > the mule-unicode charsets. > |> > |> Oh, so could it be that the `family' property of the `default' face > |> should be `unspecified' rather than `courier' ? > > ??? But I want courier, not something unspecified. But that's specified in the `font' property already. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:40 ` Stefan Monnier @ 2002-09-26 14:42 ` Andreas Schwab 2002-09-26 14:48 ` Stefan Monnier 0 siblings, 1 reply; 13+ messages in thread From: Andreas Schwab @ 2002-09-26 14:42 UTC (permalink / raw) Cc: Kenichi Handa, emacs-devel "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: |> > "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: |> > |> > |> > |> > > |> So, please try this: |> > |> > |> > > |> |> > |> > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ |> > |> > |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> > |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ |> > |> > |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 |> > |> > |> > |> > |> > |> > > That does not work either, now Emacs is using courier instead of fixed for |> > |> > |> > > the mule-unicode charsets. |> > |> |> > |> Oh, so could it be that the `family' property of the `default' face |> > |> should be `unspecified' rather than `courier' ? |> > |> > ??? But I want courier, not something unspecified. |> |> But that's specified in the `font' property already. Sorry, I don't understand what you mean. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:42 ` Andreas Schwab @ 2002-09-26 14:48 ` Stefan Monnier 2002-09-27 1:46 ` Kenichi Handa 0 siblings, 1 reply; 13+ messages in thread From: Stefan Monnier @ 2002-09-26 14:48 UTC (permalink / raw) Cc: Stefan Monnier, Kenichi Handa, emacs-devel > "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: > > |> > "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: > |> > > |> > |> > |> > > |> So, please try this: > |> > |> > |> > > |> > |> > |> > |> > > |> Emacs.Fontset-0: -*-courier-medium-r-normal--*-140-*-*-*-*-fontset-startup,\ > |> > |> > |> > > |> mule-unicode-2500-33ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > |> > |> > > |> mule-unicode-e000-ffff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1,\ > |> > |> > |> > > |> mule-unicode-0100-24ff:-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-1 > |> > |> > |> > > |> > |> > |> > > That does not work either, now Emacs is using courier instead of fixed for > |> > |> > |> > > the mule-unicode charsets. > |> > |> > |> > |> Oh, so could it be that the `family' property of the `default' face > |> > |> should be `unspecified' rather than `courier' ? > |> > > |> > ??? But I want courier, not something unspecified. > |> > |> But that's specified in the `font' property already. > > Sorry, I don't understand what you mean. Faces have both a `font' property (which specifies a fontset or a specific font) and a `family' property. Typically the `font' is set once and for all in the `default' face and is not touched by any other face: they set their `family' property instead. For some reason, the `default' face initializes its `family' property not to `unspecified' but to the name of the `font', which will thus stupidly override any other family setting in the fontset. I think that's the bug. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fontset problem 2002-09-26 14:48 ` Stefan Monnier @ 2002-09-27 1:46 ` Kenichi Handa 0 siblings, 0 replies; 13+ messages in thread From: Kenichi Handa @ 2002-09-27 1:46 UTC (permalink / raw) Cc: schwab, monnier+gnu/emacs, emacs-devel In article <200209261448.g8QEmU915967@rum.cs.yale.edu>, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes: > Faces have both a `font' property (which specifies a fontset or > a specific font) and a `family' property. > Typically the `font' is set once and for all in the `default' face > and is not touched by any other face: they set their `family' > property instead. > For some reason, the `default' face initializes its `family' property > not to `unspecified' but to the name of the `font', which will thus > stupidly override any other family setting in the fontset. I think > that's the bug. I don't think so. The font related properties of the `default' face is decided by a font Emacs uses for a frame, and that font specifies all font related properties. That way, it is assured that the other faces inheriting font realted properties from the `default' face use the same font. I think that is the design policy of xfaces.c. The current problem is that the role of family part sepecified in a fontset is not clear; is it just giving a fallback default, or is it to override the normal font selection mechanism? Previously, as people didn't have that many non-Latin-1 fonts, the above was not that big problem because the face family almost always failed (especially for CJK fonts), thus the fontset family was used if specified. But, now, there are many variations of non-Latin-1 fonts, and incomplete iso10646 fonts make the situation worse. So, until we implement a better font selection mechanism for multibyte characters, people need a way to override the current font selection mechanism. First of all, such family names as courier, times, etc are applicable only to Latin fonts. I agree that my latest change is not a complete solution, but it's a quick workaround to solve the current problem. People who are satisfied with the current font selector don't have to specify a family part in a fontset. So, if it is specified, I think it is better to regard it a sign of a request to override the current font selector. --- Ken'ichi HANDA handa@m17n.org ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2002-09-27 1:46 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-09-03 13:44 Fontset problem Andreas Schwab 2002-09-06 13:01 ` Kenichi Handa 2002-09-06 13:43 ` Andreas Schwab 2002-09-26 8:10 ` Kenichi Handa 2002-09-26 13:35 ` Andreas Schwab 2002-09-26 14:06 ` Stefan Monnier 2002-09-26 14:20 ` Andreas Schwab 2002-09-26 14:32 ` Stefan Monnier 2002-09-26 14:39 ` Andreas Schwab 2002-09-26 14:40 ` Stefan Monnier 2002-09-26 14:42 ` Andreas Schwab 2002-09-26 14:48 ` Stefan Monnier 2002-09-27 1:46 ` Kenichi Handa
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.