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 592c94bc6c
commit 630afd9b86
1 changed files with 7 additions and 1 deletions

View File

@ -635,7 +635,13 @@ __imlib_calc_size(ImlibFont *fn, int *width, int *height, const char *text)
if (i == 0)
pw += ((-gmetrics.bearingX) / 64);
if (text[i + 1] == 0)
pw += (gmetrics.bbox.xMax / 64);
{
/* special code just for tridge - maaaaate */
if (gmetrics.bbox.xMax == 0)
pw += gmetrics.advance / 64;
else
pw += (gmetrics.bbox.xMax / 64);
}
else
pw += gmetrics.advance / 64;
}