fixed a bug about Firefox font support

changed the approach for tuning granularity by factoring in the area of
sweep instead of cost.