Lines 469-475
Link Here
|
469 |
break; |
469 |
break; |
470 |
case XftTypeString: |
470 |
case XftTypeString: |
471 |
expr->op=XftOpString; |
471 |
expr->op=XftOpString; |
|
|
472 |
#ifndef XFT_WITH_FONTCONFIG |
472 |
expr->u.sval=val.u.s; |
473 |
expr->u.sval=val.u.s; |
|
|
474 |
#else |
475 |
expr->u.sval=(char *)val.u.s; |
476 |
#endif |
473 |
break; |
477 |
break; |
474 |
case XftTypeBool: |
478 |
case XftTypeBool: |
475 |
default: |
479 |
default: |
Lines 655-666
Link Here
|
655 |
if("foundry"==field || "family"==field || "encoding"==field || "style"==field) |
659 |
if("foundry"==field || "family"==field || "encoding"==field || "style"==field) |
656 |
{ |
660 |
{ |
657 |
val.type=XftTypeString; |
661 |
val.type=XftTypeString; |
|
|
662 |
#ifndef XFT_WITH_FONTCONFIG |
658 |
val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1); |
663 |
val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1); |
|
|
664 |
#else |
665 |
val.u.s=(FcChar8 *)malloc(edit ? strVal.length()+1 : strVal.length()-1); |
666 |
#endif |
659 |
|
667 |
|
660 |
if(edit) |
668 |
if(edit) |
|
|
669 |
#ifndef XFT_WITH_FONTCONFIG |
661 |
strcpy(val.u.s, strVal.local8Bit()); |
670 |
strcpy(val.u.s, strVal.local8Bit()); |
|
|
671 |
#else |
672 |
strcpy((char *)val.u.s, strVal.local8Bit()); |
673 |
#endif |
662 |
else |
674 |
else |
|
|
675 |
#ifndef XFT_WITH_FONTCONFIG |
663 |
strcpy(val.u.s, strVal.mid(1, strVal.length()-2).local8Bit()); // Need to remove quotes from each end of the string... |
676 |
strcpy(val.u.s, strVal.mid(1, strVal.length()-2).local8Bit()); // Need to remove quotes from each end of the string... |
|
|
677 |
#else |
678 |
strcpy((char *)val.u.s, strVal.mid(1, strVal.length()-2).local8Bit()); // Need to remove quotes from each end of the string... |
679 |
#endif |
664 |
} |
680 |
} |
665 |
else if("spacing"==field) |
681 |
else if("spacing"==field) |
666 |
{ |
682 |
{ |
Lines 747-754
Link Here
|
747 |
{ |
763 |
{ |
748 |
// Not sure about this... |
764 |
// Not sure about this... |
749 |
val.type=XftTypeString; |
765 |
val.type=XftTypeString; |
|
|
766 |
#ifndef XFT_WITH_FONTCONFIG |
750 |
val.u.s=(char *)malloc(strVal.length()+1); |
767 |
val.u.s=(char *)malloc(strVal.length()+1); |
751 |
strcpy(val.u.s, strVal.local8Bit()); |
768 |
strcpy(val.u.s, strVal.local8Bit()); |
|
|
769 |
#else |
770 |
val.u.s=(FcChar8 *)malloc(strVal.length()+1); |
771 |
strcpy((char *)val.u.s, strVal.local8Bit()); |
772 |
#endif |
752 |
} |
773 |
} |
753 |
else if("rgba"==field) |
774 |
else if("rgba"==field) |
754 |
{ |
775 |
{ |