[vlc-devel] [PATCH 0/4] freetype: font fallback

Salah-Eddin Shaban salshaaban at gmail.com
Mon Oct 26 22:46:46 CET 2015

On Sat, Oct 24, 2015 at 8:19 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On 22 Oct, Salah-Eddin Shaban wrote :
>> Here (finally!) is font fallback using Uniscribe on Windows, FontConfig on Linux, and the XML configuration files on Android.
> A-MA-ZING! Nothing short of that.

Thanks! :)
That means a lot to me, really.

> This close #5353 #2336 #4973 #5123 #5144 #5847 #7729 #7990 #8641 #12141
> #12432 bug reports and probably many others.
>> I had to use Uniscribe on Windows because font linking turned out to be very unreliable.
> I agree it was a good decision.
>> It works for some combinations of families/scripts only.
> I'm afraid we will need DirectWrite to have a better support.

I meant font linking by that. Font linking is unreliable because it
works only for some combinations of families/scripts. The Uniscribe
method, on the other hand, worked for all tests except those involving
east Asian text, where it kept returning Microsoft Sans Serif, a font
which has no support for these languages. And that could be a problem
or misconfiguration on my machine. I would love to know if you are
encountering similar issues with it. I would have gone with
DirectWrite but its fallback facilities require Windows 8.1 as a

>> The values in GetBestFont are arbitrary. You may want to change them. This function aims to fix two issues. If a family contains only a regular face and an Italic face is requested we should still return the regular face and let FreeType do synthetic styling. With font attachments this was not being done. The other issue is that not all styles of a family support the same scripts or codepoints. As an example the Italic face of Arial has no Arabic support whereas the regular face does. So with the font set to Arial, Italic Arabic text was appearing as missing glyphs.
> I value your opinion on this. But once again, comments would be nice.

Okay. I will add comments, and probably some useful debug messages, shortly.

More information about the vlc-devel mailing list