]> git.wh0rd.org Git - fontconfig.git/commitdiff
Extract spacing from XLFD atom
authorJuliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
Wed, 14 May 2003 20:23:24 +0000 (20:23 +0000)
committerJuliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
Wed, 14 May 2003 20:23:24 +0000 (20:23 +0000)
src/fcfreetype.c

index e7283584eeb0b67d468b1c7284168d4d93249007..52395c667029b00332154e18e6b41eda596d5c44 100644 (file)
@@ -934,6 +934,20 @@ FcFreeTypeQuery (const FcChar8     *file,
     if (!cs)
        goto bail1;
 
+#ifdef USE_FTBDF
+    /* For PCF fonts, override the computed spacing with the one from
+       the property */
+    if(MY_Get_BDF_Property(face, "SPACING", &prop) == 0 &&
+       prop.type == BDF_PROPERTY_TYPE_ATOM) {
+        if(strcmp(prop.u.atom, "c") || strcmp(prop.u.atom, "C"))
+            spacing = FC_CHARCELL;
+        else if(strcmp(prop.u.atom, "m") || strcmp(prop.u.atom, "M"))
+            spacing = FC_MONO;
+        else if(strcmp(prop.u.atom, "p") || strcmp(prop.u.atom, "P"))
+            spacing = FC_PROPORTIONAL;
+    }
+#endif
+
     /*
      * Skip over PCF fonts that have no encoded characters; they're
      * usually just Unicode fonts transcoded to some legacy encoding