fontconfig: add patch for in memory fonts bugs

This is the pull request discussed in issue #19312. I put the patches in some gists under my account not sure if they should be moved to some place more "official".

I confirmed that this fixes the problems in the video player I maintain (mpv-player/mpv) which uses libass.

I also tried to convert the formula to respect 80 column limit wherever possible. Just a few places were off.

Let me know is something must be changed :)