refactored font and bitmap loading