/* draw.c -- drawing module.
- Copyright (C) 2003, 2004
+ Copyright (C) 2003, 2004, 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
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
{
base[i].pos = begin;
base[i].to = end;
}
+ if (base->left_padding && lbearing < 0)
+ {
+ base->xoff -= lbearing;
+ base->width -= lbearing;
+ lbearing = 0;
+ }
}
g_physical_ascent = MAX (g_physical_ascent, base->ascent);
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);
+ }
}