[vlc-devel] [PATCH 1/1] Freetype: support Android's new fonts.xml

Salah-Eddin Shaban salah at videolan.org
Fri Apr 7 17:57:15 CEST 2017

Hello again JB,

You mentioned something yesterday about devices having fonts with
weights 600 and 800.

If I understand correctly you mean a family that has only these two
weights and no other?

That is, something like:

<family name="family-name">
  <font weight="600" style="normal">Regular.ttf</font>
  <font weight="600" style="italic">Italic.ttf</font>
  <font weight="800" style="normal">Bold.ttf</font>
  <font weight="800" style="italic">BoldItalic.ttf</font>

Is that what you mean?
And by the way, do you happen to have samples?

Again if I understand correctly you want us to use ranges to determine
bold and regular instead of exact values. So anything in the range
[400, 700[ is regular and anything above that is bold?

What if there are families with different values, say like 300 and 500?
In that case we would be discarding the 300 and using the 500 as
regular. Is that okay?

Whatever we do we need to avoid having multiple regulars and bolds.
For example in a family with font weights 100, 300, 400, 500, 900, 700
we should not add both 400 and 500 as regular, or both 700 and 900 as
bold. We should pick one for each. Maybe use order of appearance,
which is the reason 900 usually comes before 700. In this particular
case 400 will be used for regular and 900 for bold. Again is that

The truth is, when you told me about the Android 7 issue a month ago I
was busy with something else and I had to do this in a hurry, so I
could not investigate these issues thoroughly. It's pretty much the
same now :(

If you confirm these points I will do the necessary changes.

About the function names, maybe we should use the fonts.xml version
and not the Android version? I mean the version attribute of


As far as I know it was also version 22 for Android 6 and 5, both of
which also had the older system_fonts.xml which had no version


So please write the function names as you would like them to be and I
will update the patch.

More information about the vlc-devel mailing list