Issue #640: font advance calculation fixed