- fixed a bug in text-width.
This commit is contained in:
parent
6bb4947c2c
commit
a14d2fbadf
|
@ -13,10 +13,10 @@ extern XDrawText(), XDrawText16();
|
||||||
|
|
||||||
s48_value scx_Text_Width(s48_value Xfontstruct, s48_value text,
|
s48_value scx_Text_Width(s48_value Xfontstruct, s48_value text,
|
||||||
s48_value format){
|
s48_value format){
|
||||||
char* s;
|
|
||||||
XChar2b* s2;
|
|
||||||
XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct);
|
|
||||||
int len = (int)S48_VECTOR_LENGTH(text), i, tmp;
|
int len = (int)S48_VECTOR_LENGTH(text), i, tmp;
|
||||||
|
char s[len];
|
||||||
|
XChar2b s2[len];
|
||||||
|
XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct);
|
||||||
if (s48_extract_integer(format) == 1){
|
if (s48_extract_integer(format) == 1){
|
||||||
for (i = 0; i < len; i++){
|
for (i = 0; i < len; i++){
|
||||||
tmp = (int)s48_extract_integer(S48_VECTOR_REF(text, i));
|
tmp = (int)s48_extract_integer(S48_VECTOR_REF(text, i));
|
||||||
|
@ -161,7 +161,7 @@ s48_value scx_Draw_Poly_Text (s48_value Xdisplay, s48_value Xdrawable,
|
||||||
} else {
|
} else {
|
||||||
s48_value fontspec = S48_VECTOR_REF(text, i);
|
s48_value fontspec = S48_VECTOR_REF(text, i);
|
||||||
s48_value font = S48_CAR(fontspec);
|
s48_value font = S48_CAR(fontspec);
|
||||||
item[set].font = S48_SYMBOL_P(font) ? None : SCX_EXTRACT_FONT(font);
|
item[set].font = SCX_EXTRACT_FONT(font);
|
||||||
item[set].delta = s48_extract_integer(S48_CDR(fontspec));
|
item[set].delta = s48_extract_integer(S48_CDR(fontspec));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue