[Commit] fontconfig/src fcfreetype.c,1.32,1.33
Juliusz Chroboczek
commit@keithp.com
Mon, 12 May 2003 02:04:27 -0700
- Previous message: [Commit] mq1100 mq1100fb.c,NONE,1.1 Makefile,1.1.1.1,1.2 mq1100.h,1.1.1.1,1.2 mqinit.c,1.1.1.1,1.2
- Next message: [Commit] fontconfig/src fcfreetype.c,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: jch
Update of /local/src/CVS/fontconfig/src
In directory home.keithp.com:/tmp/cvs-serv10522/src
Modified Files:
fcfreetype.c
Log Message:
Generate FC_SIZE and FC_DPI for legacy bitmap fonts
Index: fcfreetype.c
===================================================================
RCS file: /local/src/CVS/fontconfig/src/fcfreetype.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- fcfreetype.c 7 May 2003 16:13:24 -0000 1.32
+++ fcfreetype.c 12 May 2003 09:04:24 -0000 1.33
@@ -978,6 +978,47 @@
goto bail1;
if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
goto bail1;
+#ifdef USE_FTBDF
+ if(face->num_fixed_sizes == 1) {
+ int rc;
+ int value;
+ BDF_PropertyRec prop;
+
+ rc = MY_Get_BDF_Property(face, "PIXEL_SIZE", &prop);
+ if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
+ value = prop.u.integer;
+ else if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_CARDINAL)
+ value = prop.u.cardinal;
+ else
+ goto nevermind;
+ if(value != face->available_sizes[0].height)
+ /* ``impossible'' */
+ goto nevermind;
+
+ rc = MY_Get_BDF_Property(face, "POINT_SIZE", &prop);
+ if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
+ value = prop.u.integer;
+ else if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_CARDINAL)
+ value = prop.u.cardinal;
+ else
+ goto nevermind;
+ if(!FcPatternAddDouble(pat, FC_SIZE, value / 10.0))
+ goto nevermind;
+
+ rc = MY_Get_BDF_Property(face, "RESOLUTION_Y", &prop);
+ if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
+ value = prop.u.integer;
+ else if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_CARDINAL)
+ value = prop.u.cardinal;
+ else
+ goto nevermind;
+ if(!FcPatternAddDouble(pat, FC_DPI, (double)value))
+ goto nevermind;
+
+ }
+ nevermind:
+ ;
+#endif
}
/*
- Previous message: [Commit] mq1100 mq1100fb.c,NONE,1.1 Makefile,1.1.1.1,1.2 mq1100.h,1.1.1.1,1.2 mqinit.c,1.1.1.1,1.2
- Next message: [Commit] fontconfig/src fcfreetype.c,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]