… | |
… | |
4 | * Copyright (c) 2003-2008 Marc Lehmann <schmorp@schmorp.de> |
4 | * Copyright (c) 2003-2008 Marc Lehmann <schmorp@schmorp.de> |
5 | * - original version. |
5 | * - original version. |
6 | * |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or |
9 | * the Free Software Foundation; either version 3 of the License, or |
10 | * (at your option) any later version. |
10 | * (at your option) any later version. |
11 | * |
11 | * |
12 | * This program is distributed in the hope that it will be useful, |
12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
… | |
… | |
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 | |
… | |
… | |
1044 | dTermDisplay; |
1045 | dTermDisplay; |
1045 | dTermGC; |
1046 | dTermGC; |
1046 | |
1047 | |
1047 | bool slow = this->slow |
1048 | bool slow = this->slow |
1048 | || width != term->fwidth |
1049 | || width != term->fwidth |
1049 | || height != term->fheight; |
1050 | || height != term->fheight |
|
|
1051 | || ascent != f->ascent; |
1050 | |
1052 | |
1051 | int base = ascent; // sorry, incorrect: term->fbase; |
1053 | int base = ascent; // sorry, incorrect: term->fbase; |
1052 | |
1054 | |
1053 | XGCValues v; |
1055 | XGCValues v; |
1054 | v.foreground = term->pix_colors[fg]; |
1056 | v.foreground = term->pix_colors[fg]; |