all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: cyd@stupidchicken.com, 2667@emacsbugs.donarmstrong.com
Subject: bug#2667: Still seeing inconsistent fonts
Date: Thu, 21 May 2009 10:15:56 +0900	[thread overview]
Message-ID: <E1M6wt2-0001YM-IL@etlken> (raw)
In-Reply-To: <jwvbppnefy5.fsf-monnier+emacsbugreports@gnu.org> (message from Stefan Monnier on Wed, 20 May 2009 15:43:00 -0400)

In article <jwvbppnefy5.fsf-monnier+emacsbugreports@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > But, if we can use this heuristic:

> >    X fonts that have the same property values except for
> >    size related properties supports the same set of
> >    characters on all display.  For example, all these fonts 
[...]

> That assumption is obviously not guaranteed to hold, and I
> don't think it really holds in practice, but it looks like
> an acceptable tradeoff, since the cases where it doesn't
> hold shouldn't be too frequent.

So, you mean that we should install that change, right?

> > -static Lisp_Object xfont_list_pattern P_ ((Lisp_Object, Display *, char *));
> > +static int xfont_chars_supported P_ ((Lisp_Object, XFontStruct *,
> > +				      struct charset *, struct charset *));

> Please just use ANSI-style declarations rather than K&R in new code.

Ah, I didn't realize that we switched to ANSI-style.

> > +  /* Two special cases to avoid opening rather big fonts.  */
> > +  if (AREF (props, 2), Qja)
> > +    return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil));
> > +  if (AREF (props, 2), Qko)
> > +    return Fcons (intern ("hangul"), Qnil);

> You need EQ (..) around those two tests.

Of course, sorry for the incorrect patch.

> > +  if (NILP (val))
> > +    script = Qnil;
> > +  else
> > +    script = XCDR (val);

> Aka: script = CDR (val);

Ok.  I didn't know CDR macro.

> > +  if (! repertory && NILP (xfont_scripts_cache))
> > +    {
> > +      Lisp_Object args[2];
> > +
> > +      args[0] = QCtest;
> > +      args[1] = Qequal;
> > +      xfont_scripts_cache = Fmake_hash_table (2, args);
> > +    }
> [...]
> > @@ -996,6 +1173,8 @@
> >  void
> >  syms_of_xfont ()
> >  {
> > +  staticpro (&xfont_scripts_cache);
> > +  xfont_scripts_cache = Qnil;
> >    xfont_driver.type = Qx;
> >    register_font_driver (&xfont_driver, NULL);
> >  }

> Why not just:

> @@ -996,6 +1173,8 @@
>  void
>  syms_of_xfont ()
>  {
> +  staticpro (&xfont_scripts_cache);
> +  {
> +    Lisp_Object args[2];
> +    args[0] = QCtest;
> +    args[1] = Qequal;
> +    xfont_scripts_cache = Fmake_hash_table (2, args);
> +  }
>    xfont_driver.type = Qx;
>    register_font_driver (&xfont_driver, NULL);
>  }

I usually hesitate using a Lisp symbol Qxxxx in syms_of_XXX
if I don't know where it is initialized, and wanted to avoid
increasing the temacs size where possible.

---
Kenichi Handa
handa@m17n.org






  reply	other threads:[~2009-05-21  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08  3:41 bug#2667: Still seeing inconsistent fonts Chong Yidong
2009-05-08 19:58 ` Stefan Monnier
2009-05-11 12:21   ` Kenichi Handa
2009-05-11 15:56     ` Chong Yidong
2009-05-11 17:23       ` Stefan Monnier
2009-05-20 19:43     ` Stefan Monnier
2009-05-21  1:15       ` Kenichi Handa [this message]
2009-05-21 11:26         ` Kenichi Handa
2009-05-21 14:52         ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2009-05-06  4:17 Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1M6wt2-0001YM-IL@etlken \
    --to=handa@m17n.org \
    --cc=2667@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.