]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcfreetype.c
Remove freetype requirement for build-time applications.
[fontconfig.git] / src / fcfreetype.c
index 3265a3879b7f9235e9421024e4580f0fa2c9c2ed..53fe86b67d8a008a88116c2023554529f1074189 100644 (file)
@@ -45,6 +45,7 @@
 */
 
 #include "fcint.h"
+#include "fcftint.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -959,8 +960,18 @@ FcStringContainsConst (const FcChar8           *string,
     int        i;
 
     for (i = 0; i < nc; i++)
-       if (FcStrContainsIgnoreBlanksAndCase (string, c[i].name))
-           return c[i].value;
+    {
+       if (c[i].name[0] == '<')
+       {
+           if (FcStrContainsWord (string, c[i].name + 1))
+               return c[i].value;
+       }
+       else
+       {
+           if (FcStrContainsIgnoreBlanksAndCase (string, c[i].name))
+               return c[i].value;
+       }
+    }
     return -1;
 }
 
@@ -985,6 +996,7 @@ static const FcStringConst  weightConsts[] = {
     { (FC8) "ultrablack",      FC_WEIGHT_ULTRABLACK },
     { (FC8) "superblack",      FC_WEIGHT_EXTRABLACK },
     { (FC8) "extrablack",      FC_WEIGHT_EXTRABLACK },
+    { (FC8) "<ultra",          FC_WEIGHT_ULTRABOLD }, /* only if a word */
     { (FC8) "black",           FC_WEIGHT_BLACK },
     { (FC8) "heavy",           FC_WEIGHT_HEAVY },
 };