* which glyphs _are_ missing.
*/
const XCharStruct *xcs = x11_char_struct(xfs, byte1, byte2);
- return (xcs->ascent + xcs->descent > 0 || xcs->width > 0);
+ return xcs && (xcs->ascent + xcs->descent > 0 || xcs->width > 0);
}
static unifont *x11font_create(GtkWidget *widget, const char *name,
(unsigned char)utfptr[clen] < 0xC0)
clen++;
n++;
- if (pangofont_char_width(layout, pfont,
+ if (is_rtl(string[n-1]) ||
+ pangofont_char_width(layout, pfont,
string[n-1], utfptr + oldclen,
clen - oldclen) != desired) {
clen = oldclen;