]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcname.c
use FcToLower instead of tolower
[fontconfig.git] / src / fcname.c
index 4c0eb96d4b6cf12761c84ee727e2122f7c4a426a..1f3f2ed6cd2d4da6b001471ab4fe4ff66291310b 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.13 2002/08/22 07:36:45 keithp Exp $
+ * $RCSId: xc/lib/fontconfig/src/fcname.c,v 1.15 2002/09/26 00:17:28 keithp Exp $
  *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -60,6 +60,7 @@ static const FcObjectType _FcBaseObjectTypes[] = {
     { FC_MATRIX,       FcTypeMatrix },
     { FC_CHARSET,      FcTypeCharSet },
     { FC_LANG,         FcTypeLangSet },
+    { FC_FONTVERSION,  FcTypeInteger },
 };
 
 #define NUM_OBJECT_TYPES    (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])
@@ -150,11 +151,12 @@ static const FcConstant _FcBaseConstants[] = {
     { (FcChar8 *) "mono",          "spacing",  FC_MONO, },
     { (FcChar8 *) "charcell",      "spacing",  FC_CHARCELL, },
 
-    { (FcChar8 *) "none",          "rgba",         FC_RGBA_NONE },
+    { (FcChar8 *) "unknown",       "rgba",         FC_RGBA_UNKNOWN },
     { (FcChar8 *) "rgb",           "rgba",         FC_RGBA_RGB, },
     { (FcChar8 *) "bgr",           "rgba",         FC_RGBA_BGR, },
     { (FcChar8 *) "vrgb",          "rgba",         FC_RGBA_VRGB },
     { (FcChar8 *) "vbgr",          "rgba",         FC_RGBA_VBGR },
+    { (FcChar8 *) "none",          "rgba",         FC_RGBA_NONE },
 };
 
 #define NUM_FC_CONSTANTS   (sizeof _FcBaseConstants/sizeof _FcBaseConstants[0])
@@ -216,7 +218,7 @@ FcNameGetConstant (FcChar8 *string)
 {
     const FcConstantList    *l;
     int                            i;
-    
+
     for (l = _FcConstants; l; l = l->next)
     {
        for (i = 0; i < l->nconsts; i++)
@@ -245,8 +247,7 @@ FcNameBool (FcChar8 *v, FcBool *result)
     char    c0, c1;
 
     c0 = *v;
-    if (isupper (c0))
-       c0 = tolower (c0);
+    c0 = FcToLower (c0);
     if (c0 == 't' || c0 == 'y' || c0 == '1')
     {
        *result = FcTrue;
@@ -260,8 +261,7 @@ FcNameBool (FcChar8 *v, FcBool *result)
     if (c0 == 'o')
     {
        c1 = v[1];
-       if (isupper (c1))
-           c1 = tolower (c1);
+       c1 = FcToLower (c1);
        if (c1 == 'n')
        {
            *result = FcTrue;