Refactor font loading method condition