[Top][All Lists]

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

bug#25945: Emacs aborts while calling FT_Load_Glyph

From: Werner LEMBERG
Subject: bug#25945: Emacs aborts while calling FT_Load_Glyph
Date: Sat, 04 Mar 2017 06:39:03 +0100 (CET)

>> I mean: There's more than one place where FT_Load_Glyph is called
>> with `FT_LOAD_DEFAULT'.  You say that it is `too late'; this
>> implies that FT_Load_Glyph' has already been called earlier for a
>> given glyph (with `FT_LOAD_DEFAULT'), apparently without any fatal
>> causes.
> No, it's "too late" because by the time ftfont_get_metrics is
> called, Emacs has already established that the particular character
> is supported by this font, and ftfont_get_metrics doesn't provide a
> way to tell the caller that the character is not supported.  IOW,
> all the fallbacks that look for an alternative font don't assume
> (AFAIK) that a failure to display a character by some font can be
> discovered that late.

OK, then my additional code line is definitely a good thing, since the
it makes FreeType try harder to load the glyph, so to say, and it
causes zero harm (speaking as the FreeType maintainer).

>> There's just a single `emacs_abort' related to the calls to
>> FT_Load_Glyph, and this looks strange to me – and not justified.
> It could be a problem, indeed.  But it could also be that all of
> those other calls are either (a) after this particular one, so they
> will never be made if this one fails, or (b) they have a way of
> communicating a failure to their caller.
> IOW, one must analyze these calls in the context of the control flow
> when accessing a font for displaying a character, to understand
> whether this single call to emacs_abort is enough.

Yeah.  However, I still suggest to apply my quick fix – this makes
Emacs crash one time less :-)  It works for me just fine, BTW.


reply via email to

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