duncanmak/libgdiplus — comment on commit a8c74d159f2dd2eb92319e1fd5867c2d1e597539
File:  line 0
By nirvanai:

It could potentially affect other platforms too. The problem is that cairo_select_font_face uses the platform default font backend, and gdip_get_fontfamily_details assumes that the font backend is always FreeType (due to call to cairo_ft_scaled_font_lock_face).

We looked at the cairo code and build the FcPattern with the same parameters it uses, so this code should do the font selection exactly the same way as the old code, with the exception that we're explicitly creating a FreeType font face, instead of leaving it up to the default.