X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fdraw.c;h=6155d4a5bcb43ebf97fcbf9c149a698d8924e255;hb=398685e3214363bc831a7c29f89e466a96b71e4a;hp=4149f79c83ff73f66bfe16bc5b543863ba7ba52a;hpb=041667e9aa11e929d51186e6f545f0e22bbbb278;p=m17n%2Fm17n-lib.git diff --git a/src/draw.c b/src/draw.c index 4149f79..6155d4a 100644 --- a/src/draw.c +++ b/src/draw.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the m17n library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 02111-1307, USA. */ /***en @@ -80,7 +80,7 @@ static MSymbol M_glyph_string; /* Special scripts */ -static MSymbol Minherited, Mcommon; +static MSymbol Mcommon; /* Special categories */ static MSymbol McatCc, McatCf; @@ -1112,6 +1112,7 @@ draw_background (MFrame *frame, MDrawWindow win, int x, int y, } *from_idx = *to_idx = 0; + *to_x = x; while (g->type != GLYPH_ANCHOR) { if (g->pos >= from && g->pos < to) @@ -1434,6 +1435,8 @@ render_glyph_string (MFrame *frame, MDrawWindow win, int x, int y, int from_idx, to_idx; int to_x; + if (from == to) + return; if (control->orientation_reversed) x -= gstring->indent + gstring_width (gstring, from, to, NULL, NULL); else @@ -1877,7 +1880,6 @@ mdraw__init () memset (&scratch_gstring, 0, sizeof (scratch_gstring)); MLIST_INIT1 (&scratch_gstring, glyphs, 3); - Minherited = msymbol ("inherited"); Mcommon = msymbol ("common"); McatCc = msymbol ("Cc"); @@ -2298,14 +2300,14 @@ mdraw_text_extents (MFrame *frame, } if (overall_logical_return) { - overall_ink_return->x = 0; + overall_logical_return->x = 0; overall_logical_return->width = width; overall_logical_return->height = y + gstring->descent - overall_logical_return->y; } if (overall_line_return) { - overall_ink_return->x = lbearing; + overall_line_return->x = lbearing; overall_line_return->width = MAX (width, rbearing - lbearing); overall_line_return->height = y + gstring->line_descent - overall_line_return->y;