Common X11R6 font directories
-->
- <dir>/usr/X11R6/lib/X11/fonts/truetype</dir>
- <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
- <dir>/usr/X11R6/lib/X11/fonts/TrueType</dir>
+ <dir>/usr/X11R6/lib/X11/fonts</dir>
+ <dir>/usr/share/fonts</dir>
<!-- FONTPATH_END -->
<!--
+ Enable sub-pixel rendering
+ <match target="font">
+ <edit name="rgba" mode="assign"><const>rgb</const></edit>
+ </match>
+-->
+
+<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
<match target="pattern">
<!ELEMENT edit (%expr;)*>
<!ATTLIST edit
name CDATA #REQUIRED
- mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign">
+ mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
+ binding (weak|strong) "weak">
<!--
Elements of expressions follow
}
static FcValueList *
-FcConfigValues (FcPattern *p, FcExpr *e)
+FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding)
{
FcValueList *l;
if (e->op == FcOpComma)
{
l->value = FcConfigEvaluate (p, e->u.tree.left);
- l->next = FcConfigValues (p, e->u.tree.right);
+ l->next = FcConfigValues (p, e->u.tree.right, binding);
}
else
{
l->value = FcConfigEvaluate (p, e);
l->next = 0;
}
- l->binding = FcValueBindingWeak;
+ l->binding = binding;
while (l && l->value.type == FcTypeVoid)
{
FcValueList *next = l->next;
/*
* Evaluate the list of expressions
*/
- l = FcConfigValues (p, e->expr);
+ l = FcConfigValues (p, e->expr, e->binding);
/*
* Locate any test associated with this field
*/
const char *field;
FcOp op;
FcExpr *expr;
+ FcValueBinding binding;
} FcEdit;
typedef struct _FcSubst {
FcExprDestroy (FcExpr *e);
FcEdit *
-FcEditCreate (const char *field, FcOp op, FcExpr *expr);
+FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding);
void
FcEditDestroy (FcEdit *e);
/*
- * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.14 2002/06/21 07:01:11 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.16 2002/07/12 19:19:16 keithp Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
}
FcEdit *
-FcEditCreate (const char *field, FcOp op, FcExpr *expr)
+FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding)
{
FcEdit *e = (FcEdit *) malloc (sizeof (FcEdit));
e->field = field; /* already saved in grammar */
e->op = op;
e->expr = expr;
+ e->binding = binding;
}
return e;
}
{
edit = FcEditCreate (FcConfigSaveField ("family"),
FcOpPrepend,
- prefer);
+ prefer,
+ FcValueBindingWeak);
if (edit)
edit->next = 0;
else
next = edit;
edit = FcEditCreate (FcConfigSaveField ("family"),
FcOpAppend,
- accept);
+ accept,
+ FcValueBindingWeak);
if (edit)
edit->next = next;
else
{
next = edit;
edit = FcEditCreate (FcConfigSaveField ("family"),
- FcOpAppendLast,
- def);
+ FcOpAppendLast,
+ def,
+ FcValueBindingWeak);
if (edit)
edit->next = next;
else
{
const FcChar8 *name;
const FcChar8 *mode_string;
+ const FcChar8 *binding_string;
FcOp mode;
+ FcValueBinding binding;
FcExpr *expr;
FcEdit *edit;
return;
}
}
+ binding_string = FcConfigGetAttribute (parse, "binding");
+ if (!binding_string)
+ binding = FcValueBindingWeak;
+ else
+ {
+ if (!strcmp ((char *) binding_string, "weak"))
+ binding = FcValueBindingWeak;
+ else if (!strcmp ((char *) binding_string, "strong"))
+ binding = FcValueBindingStrong;
+ else
+ {
+ FcConfigMessage (parse, FcSevereWarning, "invalid edit binding \"%s\"", binding_string);
+ return;
+ }
+ }
expr = FcPopExprs (parse, FcOpComma);
- edit = FcEditCreate ((char *) FcStrCopy (name), mode, expr);
+ edit = FcEditCreate ((char *) FcStrCopy (name), mode, expr, binding);
if (!edit)
{
FcConfigMessage (parse, FcSevereError, "out of memory");