fontselect: coretext: allow to match fontname using the provider
Not all APIs cache everything the same way that fontconfig does. This allows
to first perform a match based on the font name and then score the matched
fonts using the common code using and in memory database approach.
The benefit is the application doesn't have to load all of the fonts and
query for weight, slant, width, path and fullnames.
I left both code paths inside ass_coretext.c. This allows to test matching
problems and have a term of comparison with the slower implementation.
To activate it one just has to flip the CT_FONTS_EAGER_LOAD define to 1.
Here are some benchmarks with a pretty typical OS X font library of ~600 fonts
and using Libass's test program to load a script with 'Helvetica Neue':
CT_FONTS_EAGER_LOAD=0
0.04s user 0.02s system 79% cpu 0.081 total
CT_FONTS_EAGER_LOAD=1
0.12s user 0.06s system 44% cpu 0.420 total