Support FC_WIDTH as double as well
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 158f272..461fbf9 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1172,7 +1172,7 @@
     FcPattern	    *pat;
     int		    slant = -1;
     double	    weight = -1;
-    int		    width = -1;
+    double	    width = -1;
     FcBool	    decorative = FcFalse;
     FcBool	    variable = FcFalse;
     FcBool	    variable_weight = FcFalse;
@@ -1695,10 +1695,7 @@
 	    printf ("\tos2 weight class %d multiplier %g maps to weight %g\n",
 		    os2->usWeightClass, weight_mult, weight);
 
-	/* TODO:
-	 * Add FcWidthFromOpenTypeDouble and FcWidthToOpenTypeDouble,
-	 * and apply width_mult post-conversion? */
-	switch ((int) (os2->usWidthClass * width_mult + .5)) {
+	switch (os2->usWidthClass) {
 	case 1:	width = FC_WIDTH_ULTRACONDENSED; break;
 	case 2:	width = FC_WIDTH_EXTRACONDENSED; break;
 	case 3:	width = FC_WIDTH_CONDENSED; break;
@@ -1709,8 +1706,9 @@
 	case 8:	width = FC_WIDTH_EXTRAEXPANDED; break;
 	case 9:	width = FC_WIDTH_ULTRAEXPANDED; break;
 	}
+	width *= width_mult;
 	if ((FcDebug() & FC_DBG_SCANV) && width != -1)
-	    printf ("\tos2 width class %d multiplier %g maps to width %d\n",
+	    printf ("\tos2 width class %d multiplier %g maps to width %g\n",
 		    os2->usWidthClass, width_mult, width);
     }
     if (os2 && (complex_ = FcFontCapabilities(face)))
@@ -1825,7 +1823,7 @@
 	{
 	    width = FcIsWidth ((FcChar8 *) prop.u.atom);
 	    if (FcDebug () & FC_DBG_SCANV)
-		printf ("\tsetwidth %s maps to %d\n", prop.u.atom, width);
+		printf ("\tsetwidth %s maps to %g\n", prop.u.atom, width);
 	}
     }
 #endif
@@ -1845,7 +1843,7 @@
 	{
 	    width = FcContainsWidth (style);
 	    if (FcDebug() & FC_DBG_SCANV)
-		printf ("\tStyle %s maps to width %d\n", style, width);
+		printf ("\tStyle %s maps to width %g\n", style, width);
 	}
 	if (slant == -1)
 	{
@@ -1890,7 +1888,7 @@
     if (!variable_weight && !FcPatternAddDouble (pat, FC_WEIGHT, weight))
 	goto bail1;
 
-    if (!variable_width && !FcPatternAddInteger (pat, FC_WIDTH, width))
+    if (!variable_width && !FcPatternAddDouble (pat, FC_WIDTH, width))
 	goto bail1;
 
     if (!FcPatternAddString (pat, FC_FOUNDRY, foundry))