libs-back/Source/fontconfig
Jeff Teunissen ecba94053d sort font faces
GNUstep's font architecture makes it extremely difficult and annoying to
have a properly sorted font panel (or even one that makes any sense at all).

This might not be the best place to implement font sorting, but I'll be
damned if I can find a better one. The font enumerator knows where to look,
and has all the information needed to do it.

So, once we've enumerated all the fonts, sort them with a function that's
only slightly more clever than alphabetizing them. We sort by these
criteria, in order of importance:

1. font weight
2. traits (numeric ordering)
3. style name, with special cases so "Regular"/"Normal"/"Roman" sort
   earlier than other stuff (caption, titling, etc.)

This sorting function seems to work about as well as can be expected,
producing the obvious "Regular"/"Italic"/"Bold"/"Bold Italic" for
undemanding families, while getting more advanced ones (like, say, the 168
font faces of Kepler Std) pretty close.
2019-03-26 03:58:18 -04:00
..
FCFaceInfo.m Cairo: Reduce the hilarity of the font panel 2019-03-26 03:58:18 -04:00
FCFontEnumerator.m sort font faces 2019-03-26 03:58:18 -04:00
FCFontInfo.m Cairo: Reduce the hilarity of the font panel 2019-03-26 03:58:18 -04:00