minor fixup if last char in string has 0 boundingbox width :)

SVN revision: 4123
This commit is contained in:
Carsten Haitzler 2001-01-17 21:31:30 +00:00
parent d3a3922b8d
commit 2ee05386b4
2 changed files with 12 additions and 2 deletions

View File

@ -2058,7 +2058,12 @@ __evas_gl_text_get_size(Evas_GL_Font *fn, char *text, int *w, int *h)
if (i == 0)
pw += ((-g->metrics.bearingX) / 64);
if (text[i + 1] == 0) /* last char - ineternationalization issue */
pw += (g->metrics.bbox.xMax / 64);
{
if ((g->metrics.bbox.xMax / 64) == 0)
pw += (g->metrics.advance / 64);
else
pw += (g->metrics.bbox.xMax / 64);
}
else
pw += g->metrics.advance / 64;
}

View File

@ -1104,7 +1104,12 @@ __evas_x11_text_get_size(Evas_X11_Font *fn, char *text, int *w, int *h)
if (i == 0)
pw += ((-g->metrics.bearingX) / 64);
if (text[i + 1] == 0) /* last char - ineternationalization issue */
pw += (g->metrics.bbox.xMax / 64);
{
if ((g->metrics.bbox.xMax / 64) == 0)
pw += (g->metrics.advance / 64);
else
pw += (g->metrics.bbox.xMax / 64);
}
else
pw += g->metrics.advance / 64;
}