]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcname.c
Add ref counting to font config patterns so that FcFontSort return values
[fontconfig.git] / src / fcname.c
index 26ef53eb118f497ae10108504cb67dbdc134ea78..ad78c3db4cb07d5df22e473edac9ae37db0ea91b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.4 2002/05/29 22:07:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.7 2002/06/03 08:31:15 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -143,6 +143,7 @@ static const FcConstant _FcBaseConstants[] = {
     { (FcChar8 *) "mono",          "spacing",  FC_MONO, },
     { (FcChar8 *) "charcell",      "spacing",  FC_CHARCELL, },
 
+    { (FcChar8 *) "none",          "rgba",         FC_RGBA_NONE },
     { (FcChar8 *) "rgb",           "rgba",         FC_RGBA_RGB, },
     { (FcChar8 *) "bgr",           "rgba",         FC_RGBA_BGR, },
     { (FcChar8 *) "vrgb",          "rgba",         FC_RGBA_VRGB },
@@ -464,6 +465,8 @@ FcNameUnparseValue (FcStrBuf        *buf,
        return FcNameUnparseString (buf, temp, 0);
     case FcTypeCharSet:
        return FcNameUnparseCharSet (buf, v.u.c);
+    case FcTypeFTFace:
+       return FcTrue;
     }
     return FcFalse;
 }
@@ -498,13 +501,13 @@ FcNameUnparse (FcPattern *pat)
     const FcObjectType     *o;
 
     FcStrBufInit (&buf, buf_static, sizeof (buf_static));
-    e = FcPatternFind (pat, FC_FAMILY, FcFalse);
+    e = FcPatternFindElt (pat, FC_FAMILY);
     if (e)
     {
        if (!FcNameUnparseValueList (&buf, e->values, (FcChar8 *) FC_ESCAPE_FIXED))
            goto bail0;
     }
-    e = FcPatternFind (pat, FC_SIZE, FcFalse);
+    e = FcPatternFindElt (pat, FC_SIZE);
     if (e)
     {
        if (!FcNameUnparseString (&buf, (FcChar8 *) "-", 0))
@@ -522,7 +525,7 @@ FcNameUnparse (FcPattern *pat)
                !strcmp (o->object, FC_FILE))
                continue;
            
-           e = FcPatternFind (pat, o->object, FcFalse);
+           e = FcPatternFindElt (pat, o->object);
            if (e)
            {
                if (!FcNameUnparseString (&buf, (FcChar8 *) ":", 0))