So in my ongoing quest to get CreateScalableFontResource completed, I believe that I need to refactor gdi32/freetype.c - AddFontToList to expose an interface to allow me to retrieve a Face *.
Attached is a series of 4 patches that accomplish what I believe to be a reasonable refactoring of that function.
From my analysis, the only material change in the logic flow is that the
old code would skip a face that existed prior to building the new Face * structure. The new code goes ahead and builds up a proposed Face * before testing to see if the proposed new Face should be skipped.
It passes the font tests and notepad still runs, but I recognize that this is a much more invasive change than I am really qualified to make.
I would appreciate others with expertise in this area reviewing this series. Also, if there is advice on a standard bevy of tests I could run, I would appreciate it. There is a fair amount of special case logic in this function, and I know that our regression tests do not exercise it all.
Thanks,
Jeremy