NULL, prev->c)
!= MCHAR_INVALID_CODE));
start--, prev--)
- prev->code = code;
+ if (prev->rface->rfont != this->rface->rfont)
+ {
+ prev->rface->rfont = this->rface->rfont;
+ prev->code = code;
+ }
for (g++;
(g->type == GLYPH_CHAR
if (base->left_padding && base->lbearing < 0)
{
base->xoff = - base->lbearing;
- base->width += base->xoff;
+ if (base->rbearing < 0)
+ base->width = base->rbearing - base->lbearing;
+ else
+ base->width += base->xoff;
base->rbearing += base->xoff;
base->lbearing = 0;
}
{
base->width = base->rbearing;
}
- lbearing = (base->xoff + base->lbearing < 0
- ? base->xoff + base->lbearing : 0);
- rbearing = base->xoff + base->rbearing;
+ lbearing = base->lbearing;
+ rbearing = base->rbearing;
}
else
{
gend--;
}
if (g != gend)
- while (gend[-1].to == gend->to) gend++;
+ while (gend->type != GLYPH_ANCHOR && gend[-1].to == gend->to)
+ gend++;
}
}
pos = gstring->to;
}
else if (i == 0)
- pos++;
- compose_glyph_string (frame, mt, gstring->from, pos, gstring);
- layout_glyph_string (frame, gstring);
+ {
+ g = find_glyph_in_gstring (gstring, gstring->from, 1);
+ pos = g->to;
+ }
+ if (pos < gstring->to)
+ {
+ compose_glyph_string (frame, mt, gstring->from, pos, gstring);
+ layout_glyph_string (frame, gstring);
+ }
}
info->prev_from = g_tmp->pos;
}
- else if (info->line_from > 0)
+ else if (info->line_from > 0
+ && gstring->from > 0)
{
/* The logically previous glyph is on the previous line. */
MGlyphString *gst = get_gstring (frame, mt, gstring->from - 1,
{
glyphs->font = (MFont *) g->rface->rfont;
glyphs->font_type
- = (g->rface->rfont->font->type == MFONT_SOURCE_X ? Mx
+ = (glyphs->font->source == MFONT_SOURCE_X ? Mx
: g->rface->rfont->driver == &mfont__ft_driver ? Mfreetype
: Mxft);
glyphs->fontp = g->rface->rfont->fontp;