]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccfg.c
Allow editing charset and lang in target="scan"
[fontconfig.git] / src / fccfg.c
index 19a9fefbdaa9cb34011b7913aba8834ddb08a11a..681278114360f37c2a8ba54a9218c9e0528a68e7 100644 (file)
@@ -897,6 +897,11 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
        v.u.c = e->u.cval;
        v = FcValueSave (v);
        break;
+    case FcOpLangSet:
+       v.type = FcTypeLangSet;
+       v.u.l = e->u.lval;
+       v = FcValueSave (v);
+       break;
     case FcOpBool:
        v.type = FcTypeBool;
        v.u.b = e->u.bval;
@@ -1036,6 +1041,44 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
                    break;
                }
                break;
+           case FcTypeCharSet:
+               switch (e->op) {
+               case FcOpPlus:
+                   v.type = FcTypeCharSet;
+                   v.u.c = FcCharSetUnion (vl.u.c, vr.u.c);
+                   if (!v.u.c)
+                       v.type = FcTypeVoid;
+                   break;
+               case FcOpMinus:
+                   v.type = FcTypeCharSet;
+                   v.u.c = FcCharSetSubtract (vl.u.c, vr.u.c);
+                   if (!v.u.c)
+                       v.type = FcTypeVoid;
+                   break;
+               default:
+                   v.type = FcTypeVoid;
+                   break;
+               }
+               break;
+           case FcTypeLangSet:
+               switch (e->op) {
+               case FcOpPlus:
+                   v.type = FcTypeLangSet;
+                   v.u.l = FcLangSetUnion (vl.u.l, vr.u.l);
+                   if (!v.u.l)
+                       v.type = FcTypeVoid;
+                   break;
+               case FcOpMinus:
+                   v.type = FcTypeLangSet;
+                   v.u.l = FcLangSetSubtract (vl.u.l, vr.u.l);
+                   if (!v.u.l)
+                       v.type = FcTypeVoid;
+                   break;
+               default:
+                   v.type = FcTypeVoid;
+                   break;
+               }
+               break;
            default:
                v.type = FcTypeVoid;
                break;