migrating js "checkFont" and "fonts" to scala