mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
Fixed a warning in utf8Wrap.c
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9393 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -587,7 +587,8 @@ XUtf8_measure_extents(
|
|||||||
int ht = 0; /* used to find max height in text */
|
int ht = 0; /* used to find max height in text */
|
||||||
int hs; /* "height sum" of current text segment */
|
int hs; /* "height sum" of current text segment */
|
||||||
int yt = 0x7FFFFFFF; /* used to find bounding rectangle delta-y */
|
int yt = 0x7FFFFFFF; /* used to find bounding rectangle delta-y */
|
||||||
int res; /* result from calling XTextExtents16() - we should test this is OK! */
|
// int res; /* result from calling XTextExtents16() - we should test this is OK! */
|
||||||
|
// FC: the man does not specify error codes for it, but X will generate X errors like BadGC or BadFont.
|
||||||
|
|
||||||
XCharStruct sizes;
|
XCharStruct sizes;
|
||||||
int dir_ret = 0;
|
int dir_ret = 0;
|
||||||
@@ -623,7 +624,7 @@ XUtf8_measure_extents(
|
|||||||
if (i > 120) {
|
if (i > 120) {
|
||||||
/*** draw the buffer **/
|
/*** draw the buffer **/
|
||||||
XSetFont(display, gc, fonts[fnum]->fid);
|
XSetFont(display, gc, fonts[fnum]->fid);
|
||||||
res = XTextExtents16(fonts[fnum], buf, i, &dir_ret, &fnt_asc, &fnt_dsc, &sizes);
|
/* res = */ XTextExtents16(fonts[fnum], buf, i, &dir_ret, &fnt_asc, &fnt_dsc, &sizes);
|
||||||
/* recover the dimensions - should verify that res == 0 first! */
|
/* recover the dimensions - should verify that res == 0 first! */
|
||||||
wd += sizes.width; /* accumulate the width */
|
wd += sizes.width; /* accumulate the width */
|
||||||
hs = sizes.ascent + sizes.descent; /* total height */
|
hs = sizes.ascent + sizes.descent; /* total height */
|
||||||
|
|||||||
Reference in New Issue
Block a user