Index: ftfuncs.c
===================================================================
RCS file: /cvs/xorg/xc/lib/font/FreeType/ftfuncs.c,v
retrieving revision 1.4
diff -u -r1.4 ftfuncs.c
--- ftfuncs.c	2 Aug 2004 19:35:07 -0000	1.4
+++ ftfuncs.c	2 Aug 2004 21:25:31 -0000
@@ -25,7 +25,7 @@
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
-/* $XdotOrg: xc/lib/font/FreeType/ftfuncs.c,v 1.4 2004/08/02 19:35:07 eich Exp $ */
+/* $XdotOrg: xc/lib/font/FreeType/ftfuncs.c,v 1.3 2004/05/04 18:47:31 gisburn Exp $ */
 
 /* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.43 2004/02/07 04:37:18 dawes Exp $ */
 
@@ -1049,6 +1049,7 @@
 	else{
 	    int new_width;
 	    double ratio;
+	    int factor;
 #if (FREETYPE_VERSION < 2001008)
 	    int try_very_lazy=correct;
 	    if( try_very_lazy ) {
@@ -1077,6 +1078,7 @@
 					    * instance->ttcap.scaleBBoxWidth / 64.0 + .5);
 		ascent = metrics->horiBearingY / 64;
 		descent = (metrics->height - metrics->horiBearingY) / 64 ;
+		factor = metrics->horiAdvance;
 #else
 	    if( ! (instance->load_flags & FT_LOAD_NO_BITMAP) ) {
 		if( FT_Do_SBit_Metrics(face->face,instance->size,instance->strike_index,
@@ -1110,6 +1112,7 @@
 					    * instance->ttcap.scaleBBoxWidth / 64.0 + .5);
 		ascent = bitmap_metrics->horiBearingY / 64;
 		descent = (bitmap_metrics->height - bitmap_metrics->horiBearingY) / 64 ;
+		factor = bitmap_metrics->horiAdvance;
 #endif
                 /* */
 		new_width = characterWidth;
@@ -1127,12 +1130,7 @@
 		leftSideBearing  += instance->ttcap.lsbShiftOfBitmapAutoItalic;
 		/* */
 		rawCharacterWidth =
-		    (unsigned short)(short)(floor(1000
-#if (FREETYPE_VERSION < 2001008)
-						  * metrics->horiAdvance 
-#else
-						  * bitmap_metrics->horiAdvance 
-#endif
+		    (unsigned short)(short)(floor(1000 * factor
 						  * instance->ttcap.scaleBBoxWidth * ratio / 64.
 						  / instance->pixel_size));
 	    }
