all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: lg.zevlg@gmail.com, rpluim@gmail.com, 39133@debbugs.gnu.org
Subject: bug#39133: 28.0.50; Emacs slowdown on special char
Date: Wed, 15 Jan 2020 18:19:28 +0200	[thread overview]
Message-ID: <83r2004rqn.fsf@gnu.org> (raw)
In-Reply-To: <wlmuape464.wl-mituharu@math.s.chiba-u.ac.jp> (message from YAMAMOTO Mitsuharu on Wed, 15 Jan 2020 13:26:11 +0900)

> Date: Wed, 15 Jan 2020 13:26:11 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Cc: Eli Zaretskii <eliz@gnu.org>,
> 	Evgeny Zajcev <lg.zevlg@gmail.com>,
> 	39133@debbugs.gnu.org, handa@gnu.org
> 
> +  if (code != FONT_INVALID_CODE)
> +    {
> +      struct font_metrics metrics;
> +
> +      LGLYPH_SET_CODE (glyph, code);
> +      font->driver->text_extents (font, &code, 1, &metrics);
> +      LGLYPH_SET_LBEARING (glyph, metrics.lbearing);
> +      LGLYPH_SET_RBEARING (glyph, metrics.rbearing);
> +      LGLYPH_SET_WIDTH (glyph, metrics.width);
> +      LGLYPH_SET_ASCENT (glyph, metrics.ascent);
> +      LGLYPH_SET_DESCENT (glyph, metrics.descent);
> +    }
>  }
>  
>  
> But I'm not sure if it is ok to leave the code and metrics-related
> fields nil when encode_char returns FONT_INVALID_CODE.  Handa-san?

We could do in the 'else' branch the same we do in the single caller
of this function, fill_gstring_body, when we don't call
font_fill_lglyph_metrics:

      if (FONT_OBJECT_P (font_object))
	{
	  font_fill_lglyph_metrics (g, font_object);
	}
      else
	{
	  int width = XFIXNAT (CHAR_TABLE_REF (Vchar_width_table, c));

	  LGLYPH_SET_CODE (g, c);
	  LGLYPH_SET_LBEARING (g, 0);
	  LGLYPH_SET_RBEARING (g, width);
	  LGLYPH_SET_WIDTH (g, width);
	  LGLYPH_SET_ASCENT (g, 1);
	  LGLYPH_SET_DESCENT (g, 0);
	}





  parent reply	other threads:[~2020-01-15 16:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 13:21 bug#39133: 28.0.50; Emacs slowdown on special char Evgeny Zajcev
2020-01-14 15:26 ` Eli Zaretskii
2020-01-14 16:24   ` Robert Pluim
2020-01-15  4:26     ` YAMAMOTO Mitsuharu
2020-01-15  8:25       ` Robert Pluim
2020-01-15 10:47         ` Evgeny Zajcev
2020-01-15 16:19       ` Eli Zaretskii [this message]
2020-01-24 10:13         ` Robert Pluim
2020-01-24 10:22           ` Eli Zaretskii
2020-01-24 13:09             ` Robert Pluim
2020-01-24 13:40               ` Eli Zaretskii
2020-01-24 13:50                 ` Robert Pluim
2020-01-24 15:41                   ` Robert Pluim
2020-01-24 15:52                     ` Eli Zaretskii
2020-03-02  7:40                       ` Robert Pluim
2020-03-02  8:49                         ` Eli Zaretskii
2020-03-02  9:25                           ` Robert Pluim

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=83r2004rqn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39133@debbugs.gnu.org \
    --cc=lg.zevlg@gmail.com \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    --cc=rpluim@gmail.com \
    /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.