Refactor of our Vfont check for font validity.
No functional changes here, just a correction of function that is confusing.
When about to load a vfont (used for 3D text objects) we check that the font is valid. But this function does not work as it appears. It currently does this:
glyph_index = FT_Get_Char_Index(face, 'A'); err = FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP);
So it tries to obtain the glpyh index for the uppercase letter "A", if it can do so it loads that glyph and does further tests, if not errors out.
First, we should not deem a font invalid because it does not include latin letters. There are many valid and useful fonts without the letter "A" and everything in blender works fine with such fonts.
But more importantly this check doesn't work as it seems. The return of FT_Get_Char_Index for a font that does not include 'A' is zero. And that is a valid glyph index (as long as there is at least one). So this doesn't return an error if the font does not contain 'A'.
A better way to do this is to instead call FT_Get_First_Char() which always just gives you first glyph.
The current function also does not call FT_Done_Face() which should occur after opening a face with FT_New_Memory_Face.
This also reorganizes the function to be a bit shorter and easier to read.