Replaces for-in loop by regular for loop in fonts.js to improve performance

Fixes #4580 (thanks to @fkaelberer and @p01 for the suggestion!).

Note that the cMap errors/warnings in the console are another issue described in #4800.