if (STRINGP (it->string))
{
+ unsigned char *s;
+
pos = IT_STRING_CHARPOS (*it);
pos_byte = IT_STRING_BYTEPOS (*it);
string = it->string;
+ s = SDATA (string) + pos_byte;
+ it->c = STRING_CHAR (s, 0);
}
else
{
pos = IT_CHARPOS (*it);
pos_byte = IT_BYTEPOS (*it);
string = Qnil;
+ it->c = FETCH_CHAR (pos_byte);
}
/* If there's a valid composition and point is not inside of the
Lisp_Object lgstring = AREF (XHASH_TABLE (composition_hash_table)
->key_and_value,
cmp->hash_index * 2);
-
- it->c = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0));
}
else
#endif /* USE_FONT_BACKEND */
s->cmp->hash_index * 2);
s->face = base_face;
- s->font_info = s->cmp->font;
+ s->font_info = base_face->font_info;
s->font = s->font_info->font;
for (i = 0, s->nchars = 0; i < s->cmp->glyph_len; i++, s->nchars++)
{
if (c != '\t')
{
- int face_id = FACE_FOR_CHAR (s->f, base_face, c, -1, Qnil);
+ int face_id = FACE_FOR_CHAR (s->f, base_face->ascii_face, c,
+ -1, Qnil);
face = get_char_face_and_encoding (s->f, c, face_id,
s->char2b + i, 1, 1);
int n; \
\
char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \
- base_face = base_face->ascii_face; \
\
/* Make glyph_strings for each glyph sequence that is drawable by \
the same face, and append them to HEAD/TAIL. */ \
take_vertical_position_into_account (it);
+ if (it->ascent < 0)
+ it->ascent = 0;
+ if (it->descent < 0)
+ it->descent = 0;
+
if (it->glyph_row)
append_glyph (it);
}
#ifdef USE_FONT_BACKEND
if (cmp->method == COMPOSITION_WITH_GLYPH_STRING)
{
- if (! cmp->font || cmp->font != font)
- font_prepare_composition (cmp, it->f);
+ PREPARE_FACE_FOR_DISPLAY (it->f, face);
+ font_prepare_composition (cmp, it->f);
}
else
#endif /* USE_FONT_BACKEND */
it->pixel_width = cmp->pixel_width;
it->ascent = it->phys_ascent = cmp->ascent;
- if (it->ascent < 0)
- it->ascent = it->phys_ascent = 0;
it->descent = it->phys_descent = cmp->descent;
- if (it->descent < 0)
- it->descent = it->phys_descent = 0;
if (face->box != FACE_NO_BOX)
{
int thick = face->box_line_width;
it->ascent += overline_margin;
take_vertical_position_into_account (it);
+ if (it->ascent < 0)
+ it->ascent = 0;
+ if (it->descent < 0)
+ it->descent = 0;
if (it->glyph_row)
append_composite_glyph (it);