Re: Bug: listing fonts with missing BDF properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike FABIAN <mfabian@xxxxxxx> さんは書きました:

[...]

> For details see:
>
> http://bugzilla.novell.com/show_bug.cgi?id=150552
>
> As FAMILY_NAME is missing, fontconfig lists the file name instead.

[...]

> Probably fontconfig shouldn't list such fonts in the first place
> to avoid such problems.

I made a patch to ignore all bitmap fonts which lack the BDF property
FAMILY_NAME. Attached.

diff -ru fontconfig-2.3.93.20060213.orig/src/fcfreetype.c fontconfig-2.3.93.20060213/src/fcfreetype.c
--- fontconfig-2.3.93.20060213.orig/src/fcfreetype.c	2006-01-25 16:02:46.000000000 +0100
+++ fontconfig-2.3.93.20060213/src/fcfreetype.c	2006-02-13 22:14:23.000000000 +0100
@@ -1609,6 +1609,11 @@
             int value;
             BDF_PropertyRec prop;
 
+	    /* skip bitmap fonts which do not even have a family name */
+	    rc =  FT_Get_BDF_Property(face, "FAMILY_NAME", &prop);
+            if (rc != 0 || prop.type != BDF_PROPERTY_TYPE_ATOM)
+		goto bail1;
+	    
             rc = FT_Get_BDF_Property(face, "POINT_SIZE", &prop);
             if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
                 value = prop.u.integer;
-- 
Mike FABIAN   <mfabian@xxxxxxx>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux