… | |
… | |
934 | // ignore characters we wouldn't use anyways |
934 | // ignore characters we wouldn't use anyways |
935 | bool careful; |
935 | bool careful; |
936 | if (!has_char (*t, &prop, careful)) |
936 | if (!has_char (*t, &prop, careful)) |
937 | continue; |
937 | continue; |
938 | |
938 | |
939 | XChar2b ch = { *t >> 8, *t }; |
939 | // the casts are needed in C++11 (see 8.5.1) |
|
|
940 | XChar2b ch = { (unsigned char)(*t >> 8), (unsigned char)*t }; |
940 | |
941 | |
941 | XCharStruct g; |
942 | XCharStruct g; |
942 | int dir_ret, asc_ret, des_ret; |
943 | int dir_ret, asc_ret, des_ret; |
943 | XTextExtents16 (f, &ch, 1, &dir_ret, &asc_ret, &des_ret, &g); |
944 | XTextExtents16 (f, &ch, 1, &dir_ret, &asc_ret, &des_ret, &g); |
944 | |
945 | |