font-size measuring: fix for headless tests