fix up ttf-related code readability