all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kenichi Handa <handa@gnu.org>
Cc: 25945@debbugs.gnu.org
Subject: bug#25945: Emacs aborts while calling FT_Load_Glyph
Date: Sat, 11 Mar 2017 21:08:03 +0200	[thread overview]
Message-ID: <83shmjd430.fsf@gnu.org> (raw)
In-Reply-To: <83bmtin5o5.fsf@gnu.org> (message from Eli Zaretskii on Fri, 03 Mar 2017 10:08:42 +0200)

Ping!

> Date: Fri, 03 Mar 2017 10:08:42 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 25945@debbugs.gnu.org
> 
> > Date: Fri, 03 Mar 2017 08:04:29 +0100 (CET)
> > From: Werner LEMBERG <wl@gnu.org>
> > 
> > For me, Emacs aborts at ftfont.c:1550 while `mew' tries to display an
> > e-mail.
> > 
> >   1549  if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0)
> >   1550    emacs_abort ();
> > 
> > Examining `ft_face' and `g->g.code' I see that the font in question is
> > `Padauk Book Bold' (PadaukBook-Bold.ttf), glyph 376.  Examining this
> > font further with `ftview' I see that bytecode of this font is broken,
> > and that the font can only be displayed successfully without bytecode.
> > [This is version 3.002 of the font, taken from the current TeXLive
> > repository.]
> > 
> > I think there is no reason that Emacs aborts for such broken fonts.
> > Instead I suggest that (a) Emacs tries to load the glyph again without
> > hinting, and (b) if that fails, it should display a missing glyph,
> > using the standard rectangle with hex digits in it.
> > 
> > New code for (a) is quite simple:
> > 
> >   if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0)
> >     if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_NO_HINTING) != 0)
> >       ...
> 
> This should probably be accompanied by a suitable FONT_ADD_LOG call,
> to mention that this fallback was taken.
> 
> > [The code might be further improved by implementing a per-font glyph
> >  load mode, to be initialized with `FT_LOAD_DEFAULT'.  If, say, 100
> >  calls using `FT_LOAD_DEFAULT' for a given font fails, and
> >  `FT_LOAD_NO_HINTING' is successful, the default loading behaviour for
> >  this font could be switched to `FT_LOAD_NO_HINTING'.  Given that such
> >  broken fonts are rare my suggestion is probably overkill, however.]
> > 
> > My knowledge of Emacs internals is too small to provide an
> > implementation for (b).
> 
> I think it's too late for (b) when we discover this problem in
> ftfont_get_metrics.  To do (b) we should have discovered this in
> ftfont_has_char, or thereabouts.
> 
> I'm CC'ing Handa-san in the hope that he will have insights and
> comments on this.
> 
> Thanks.





  parent reply	other threads:[~2017-03-11 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03  7:04 bug#25945: Emacs aborts while calling FT_Load_Glyph Werner LEMBERG
2017-03-03  8:08 ` Eli Zaretskii
2017-03-03  8:32   ` Werner LEMBERG
2017-03-03  8:43     ` Eli Zaretskii
2017-03-03 10:37       ` Werner LEMBERG
2017-03-03 13:43         ` Eli Zaretskii
2017-03-04  5:39           ` Werner LEMBERG
2017-03-04  9:32             ` Eli Zaretskii
2017-03-11 19:08   ` Eli Zaretskii [this message]
2017-04-11 10:08 ` Eli Zaretskii

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=83shmjd430.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25945@debbugs.gnu.org \
    --cc=handa@gnu.org \
    /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.