int size = gstring->control.fixed_width;
int ignore_formatting_char = gstring->control.ignore_formatting_char;
int i, limit;
+ int last;
MLIST_RESET (gstring);
gstring->from = from;
APPEND_GLYPH (gstring, g_tmp);
stop = face_change = charset_change = language_change = pos = from;
- g = gstring->glyphs + gstring->used;
+ last = 0;
non_ascii_found = 0;
while (1)
{
}
}
- if (pos == stop || script != this_script || g->type != g_tmp.type)
+ if (pos == stop || script != this_script
+ || MGLYPH (last)->type != g_tmp.type)
{
+ g = MGLYPH (last);
if (non_ascii_found && g->type == GLYPH_CHAR)
while (g < gstring->glyphs + gstring->used)
g = mface__for_chars (script, language, charset,
g, gstring->glyphs + gstring->used, size);
- g = gstring->glyphs + gstring->used;
+ last = gstring->used;
non_ascii_found = 0;
script = this_script;
if (pos == to)
language, charset, size)
: default_rface);
}
- stop = language_change;
+ stop = to;
+ if (stop > language_change)
+ stop = language_change;
if (stop > charset_change)
stop = charset_change;
if (face_change < stop)