]> git.wh0rd.org Git - fontconfig.git/commitdiff
Switch to locale-independent string compare function
authorKeith Packard <keithp@keithp.com>
Fri, 11 Apr 2003 22:24:23 +0000 (22:24 +0000)
committerKeith Packard <keithp@keithp.com>
Fri, 11 Apr 2003 22:24:23 +0000 (22:24 +0000)
src/fcfreetype.c

index 972390da3c70171d82169d73b69ff0e505d3bbef..dcbcc56f2cc432902091fb185b54d514bb36e021 100644 (file)
@@ -574,33 +574,33 @@ FcFreeTypeQuery (const FcChar8    *file,
     
     if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
     {
-        if (strcasecmp("thin", psfontinfo.weight) == 0) 
+        if (FcStrCmpIgnoreCase((FcChar8 *)"thin", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_THIN; 
-        else if (strcasecmp("extralight", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"extralight", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_EXTRALIGHT; 
-        else if (strcasecmp("ultralight", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"ultralight", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_ULTRALIGHT; 
-        else if (strcasecmp("light", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"light", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_LIGHT; 
-        else if (strcasecmp("regular", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"regular", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_REGULAR; 
-        else if (strcasecmp("normal", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"normal", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_NORMAL; 
-        else if (strcasecmp("medium", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"medium", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_MEDIUM; 
-        else if (strcasecmp("demibold", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"demibold", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_DEMIBOLD; 
-        else if (strcasecmp("semibold", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"semibold", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_SEMIBOLD; 
-        else if (strcasecmp("extrabold", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"extrabold", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_EXTRABOLD; 
-        else if (strcasecmp("ultrabold", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"ultrabold", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_EXTRABOLD; 
-        else if (strcasecmp("bold", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"bold", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_BOLD; 
-        else if (strcasecmp("black", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"black", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_BLACK; 
-        else if (strcasecmp("heavy", psfontinfo.weight) == 0) 
+        else if (FcStrCmpIgnoreCase((FcChar8 *)"heavy", (FcChar8 *) psfontinfo.weight) == 0) 
             weight = FC_WEIGHT_BLACK; 
      
         if (psfontinfo.italic_angle < 0)