[Commit] fontconfig/src fcfreetype.c,1.35,1.36
Juliusz Chroboczek
commit@keithp.com
Wed, 14 May 2003 13:23:26 -0700
Committed by: jch
Update of /local/src/CVS/fontconfig/src
In directory home.keithp.com:/tmp/cvs-serv6744/src
Modified Files:
fcfreetype.c
Log Message:
Extract spacing from XLFD atom
Index: fcfreetype.c
===================================================================
RCS file: /local/src/CVS/fontconfig/src/fcfreetype.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- fcfreetype.c 12 May 2003 20:48:59 -0000 1.35
+++ fcfreetype.c 14 May 2003 20:23:24 -0000 1.36
@@ -934,6 +934,20 @@
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