The loading of a font size or style renders bitmaps of the characters
0-255 and stores them in a cache. But glyphs 128-255 in this cache are
not accessible. What used to be ansi high-bit characters are now multi-
byte UTF-8 sequences.
Therefore this patch reduces the glyph_ascii_table size to 128 and
only caches characters 32-127, the visible portion of ASCII, which
greatly reduces the time to load a font.
GlyphCacheBLF has a general ListBase of glyphs but also has an array of 255 GlyphBLF called "glyph_ascii_table", used for "fast ascii lookup." Whenever we use a font size and style for the first time we call blf_font_ensure_ascii_table() which populates this array with rendered glyphs, in a loop 0...255.
But since adding support for UTF-8, we only use this table for glyphs under 128. macro BLF_UTF8_NEXT_FAST checks to see if the character is less than 128. If so it grabs the glyph from the glyph_ascii_table, otherwise loads it using a 32-bit unicode value and saves it to the regular cache. blf_font_draw_ascii_ex() assumes character under 128
I'm just not seeing a code path that will use glyphs 128-255. In one test, printing out a short word using 300 different fonts, that took 7.16 seconds, it took just 4.41 with this patch applied.