]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcfreetype.c
Generate and install PDF versions of the manuals
[fontconfig.git] / src / fcfreetype.c
index 7ca65fdeec36504f7b2f6e7f79b89d62ae26a2c1..2446170d576202b09e512086b00effead77ed7f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * $RCSId: xc/lib/fontconfig/src/fcfreetype.c,v 1.11 2002/08/31 22:17:32 keithp Exp $
  *
- * Copyright © 2001 Keith Packard
+ * Copyright Â© 2001 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
@@ -23,7 +23,7 @@
  */
 
 /*
-  Copyright © 2002-2003 by Juliusz Chroboczek
+  Copyright Â© 2002-2003 by Juliusz Chroboczek
 
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
@@ -1163,19 +1163,21 @@ FcFreeTypeQuery (const FcChar8  *file,
            free (utf8);
     }
     
-    if (!nfamily && face->family_name)
+    if (!nfamily && face->family_name && 
+       FcStrCmpIgnoreBlanksAndCase (face->family_name, "") != 0)
     {
        if (FcDebug () & FC_DBG_SCANV)
-           printf ("using FreeType family %s", face->family_name);
+           printf ("using FreeType family \"%s\"\n", face->family_name);
        if (!FcPatternAddString (pat, FC_FAMILY, face->family_name))
            goto bail1;
        ++nfamily;
     }
     
-    if (!nstyle && face->style_name)
+    if (!nstyle && face->style_name &&
+       FcStrCmpIgnoreBlanksAndCase (face->style_name, "") != 0)
     {
        if (FcDebug () & FC_DBG_SCANV)
-           printf ("using FreeType style %s", face->family_name);
+           printf ("using FreeType style \"%s\"\n", face->style_name);
        if (!FcPatternAddString (pat, FC_STYLE, face->style_name))
            goto bail1;
        ++nstyle;
@@ -1199,7 +1201,7 @@ FcFreeTypeQuery (const FcChar8    *file,
        strncpy ((char *) family, (char *) start, end - start);
        family[end - start] = '\0';
        if (FcDebug () & FC_DBG_SCANV)
-           printf ("using filename for family %s", family);
+           printf ("using filename for family %s\n", family);
        if (!FcPatternAddString (pat, FC_FAMILY, family))
        {
            free (family);
@@ -1279,9 +1281,6 @@ FcFreeTypeQuery (const FcChar8    *file,
     if (!FcPatternAddInteger (pat, FC_INDEX, id))
        goto bail1;
 
-    if (!FcPatternAddString (pat, FC_SOURCE, (FcChar8 *) "FreeType"))
-       goto bail1;
-
 #if 0
     /*
      * don't even try this -- CJK 'monospace' fonts are really