[FONT][FREETYPE] Refactor global variable names and locking (#591)