Today I looked into how Inkscape finds and presents fonts (using Xft, i.e. this only affects Linux). Lots of problems are now fixed.
1. For some reason, Inkscape ignored all fonts from *.pfa files, commenting thus:
/* fixme: This is silly and evil */ /* But Freetype just does not load pfa reliably (Lauris) */ /* Changed to exclude pfa, better for OSX */
In my tests, pfa fonts are loaded just as well as any other fonts. So I restored the pfa loading capability. Now I need someone else to confirm that it works with pfa fonts. This may fix bug 894947.
2. Much worse, when parsing a font, Inkscape (that is, Sodipodi, because this part of the code did not change from Sodipodi times) only pays attention to weight and slant - and nothing else. As a result, font faces within a family that differ in some other parameters (condensed, outline, small caps etc) were simply ignored, not used and not shown. Until today, Inkscape only loaded 173 font faces on my system; after I fixed this and the pfa loading, it shows 202! This will likely fix bug 904962.
3. The names for faces within a family were constructed by Inkscape from the numeric weight and slant parameters. As a result, all fonts were shown in the list as "Normal", "Italic", etc., even when the fonts used different style names (Regular, Book, Slanted etc). Now it remembers and uses for display the exact style name of the font as returned by Xft.
4. When sorting full font names into families, a rather stupid algorithm was used which unreliably compared font names with family names. As a result, fonts sometimes ended up in wrong families. This is now fixed, each font remembers its exact full name and family name as reported by Xft.
5. Very annoyingly, the list of styles in the Text dialog was not sorted. Now it is sorted so that Regular or Roman always comes first, then Italic, Bold, Bold Italic.
TODO: This is only tested on Linux. I may well have broken something on Windows. This also requires additional testing (and likely coding) to accommodate non-ASCII font names and style names.
_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2...