/*
- * $RCSId: xc/lib/fontconfig/src/fcname.c,v 1.15 2002/09/26 00:17:28 keithp Exp $
+ * fontconfig/src/fcname.c
*
* Copyright © 2000 Keith Packard
*
{ FC_CAPABILITY, FcTypeString },
{ FC_FONTFORMAT, FcTypeString },
{ FC_EMBOLDEN, FcTypeBool },
- { FC_EMBEDDED_BITMAP, FcTypeBool }, /* 39 */
+ { FC_EMBEDDED_BITMAP, FcTypeBool },
+ { FC_DECORATIVE, FcTypeBool },
+ { FC_LCD_FILTER, FcTypeInteger }, /* 41 */
};
#define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])
return 0;
}
+FcObjectSet *
+FcObjectGetSet (void)
+{
+ int i;
+ FcObjectSet *os = NULL;
+
+
+ os = FcObjectSetCreate ();
+ for (i = 0; i < FcObjectsNumber; i++)
+ FcObjectSetAdd (os, FcObjects[i].object);
+
+ return os;
+}
+
FcBool
FcObjectInit (void)
{
{ (FcChar8 *) "extrabold", "weight", FC_WEIGHT_EXTRABOLD, },
{ (FcChar8 *) "ultrabold", "weight", FC_WEIGHT_EXTRABOLD, },
{ (FcChar8 *) "black", "weight", FC_WEIGHT_BLACK, },
+ { (FcChar8 *) "heavy", "weight", FC_WEIGHT_HEAVY, },
{ (FcChar8 *) "roman", "slant", FC_SLANT_ROMAN, },
{ (FcChar8 *) "italic", "slant", FC_SLANT_ITALIC, },
{ (FcChar8 *) "hintslight", "hintstyle", FC_HINT_SLIGHT },
{ (FcChar8 *) "hintmedium", "hintstyle", FC_HINT_MEDIUM },
{ (FcChar8 *) "hintfull", "hintstyle", FC_HINT_FULL },
+
+ { (FcChar8 *) "antialias", "antialias", FcTrue },
+ { (FcChar8 *) "hinting", "hinting", FcTrue },
+ { (FcChar8 *) "verticallayout", "verticallayout", FcTrue },
+ { (FcChar8 *) "autohint", "autohint", FcTrue },
+ { (FcChar8 *) "globaladvance", "globaladvance", FcTrue },
+ { (FcChar8 *) "outline", "outline", FcTrue },
+ { (FcChar8 *) "scalable", "scalable", FcTrue },
+ { (FcChar8 *) "minspace", "minspace", FcTrue },
+ { (FcChar8 *) "embolden", "embolden", FcTrue },
+ { (FcChar8 *) "embeddedbitmap", "embeddedbitmap", FcTrue },
+ { (FcChar8 *) "decorative", "decorative", FcTrue },
+ { (FcChar8 *) "lcdnone", "lcdfilter", FC_LCD_NONE },
+ { (FcChar8 *) "lcddefault", "lcdfilter", FC_LCD_DEFAULT },
+ { (FcChar8 *) "lcdlight", "lcdfilter", FC_LCD_LIGHT },
+ { (FcChar8 *) "lcdlegacy", "lcdfilter", FC_LCD_LEGACY },
};
#define NUM_FC_CONSTANTS (sizeof _FcBaseConstants/sizeof _FcBaseConstants[0])
break;
case FcTypeString:
v.u.s = FcStrStaticName(string);
+ if (!v.u.s)
+ v.type = FcTypeVoid;
break;
case FcTypeBool:
if (!FcNameBool (string, &v.u.b))
break;
case FcTypeCharSet:
v.u.c = FcNameParseCharSet (string);
+ if (!v.u.c)
+ v.type = FcTypeVoid;
break;
case FcTypeLangSet:
v.u.l = FcNameParseLangSet (string);
+ if (!v.u.l)
+ v.type = FcTypeVoid;
break;
default:
break;
for (;;)
{
name = FcNameFindNext (name, ":,", save, &delim);
- if (t && strcmp (t->object, _FcBaseObjectTypes[0].object))
+ if (t)
{
v = FcNameConvert (t->type, save, &m);
if (!FcPatternAdd (pat, t->object, v, FcTrue))
{
if ((c = FcNameGetConstant (save)))
{
- if (!FcPatternAddInteger (pat, c->object, c->value))
- goto bail2;
+ t = FcNameGetObjectType ((char *) c->object);
+ switch (t->type) {
+ case FcTypeInteger:
+ case FcTypeDouble:
+ if (!FcPatternAddInteger (pat, c->object, c->value))
+ goto bail2;
+ break;
+ case FcTypeBool:
+ if (!FcPatternAddBool (pat, c->object, c->value))
+ goto bail2;
+ break;
+ default:
+ break;
+ }
}
}
}
return FcTrue;
}
-static FcBool
+FcBool
FcNameUnparseValue (FcStrBuf *buf,
FcValue *v0,
FcChar8 *escape)
return FcFalse;
}
-static FcBool
+FcBool
FcNameUnparseValueList (FcStrBuf *buf,
FcValueListPtr v,
FcChar8 *escape)
FcStrBufDestroy (&buf);
return 0;
}
+#define __fcname__
+#include "fcaliastail.h"
+#undef __fcname__