mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
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. |
||
---|---|---|
.. | ||
art | ||
cairo | ||
English.lproj | ||
fontconfig | ||
gsc | ||
opal | ||
Swedish.lproj | ||
win32 | ||
winlib | ||
x11 | ||
xdps | ||
xlib | ||
.cvsignore | ||
GNUmakefile | ||
GNUmakefile.postamble | ||
GNUmakefile.preamble | ||
GSBackend.m |