fix: use fontSize and fontFamily in calculateCharacterWidth()