Pander
2009-Nov-07 15:00 UTC
[Fontconfig] Newbe that would like to contribute improvements
Hi all, I''m a complete newby at configuring fontconfig and would like some pointers on how to get started. I have a lot of information on fonts that can be made better available in fontconfig and would like to be able to add that in my fontconfig configuration and submit to this project so more open and free fonts are supported better. For example, I have a font that is made available like this: fc-list : family style file|grep -i justus Justus-Roman.ttf: Justus:style=Roman Justus-Bold.ttf: Justus:style=Bold Justus-Italic.ttf: Justus:style=Italic Justus-Versalitas.ttf: Justus:style=Versalitas Justus-Oldstyle.ttf: Justus:style=Oldstyle Justus-ItalicOldstyle.ttf: Justus:style=ItalicOldstyle What minimal configuration to I need to do add in /etc/fonts in order to get this as output, see _text between underscores_ for changes: fc-list : family style file|grep -i justus Justus-Roman.ttf: Justus:style=Roman Justus-Bold.ttf: Justus:style=Bold Justus-Italic.ttf: Justus:style=Italic Justus-Versalitas.ttf: Justus_ Versalitas_:style=_Roman_ Justus-Oldstyle.ttf: Justus_ Oldstyle_:style=_Roman_ Justus-ItalicOldstyle.ttf: Justus_ Oldstyle_:style=_Italic_ If someone would get me up to speed with this I can submit a series of fixes and new additions. Note, I''m not too lazy to read the manual. Because I''m new to this, I''m just looking on how to get started quickly in a way that the developers can work with this as best as possible and have fontconfig support more open and free fonts better. Regards, Pander
Nicolas Mailhot
2009-Nov-07 16:00 UTC
[Fontconfig] Newbe that would like to contribute improvements
Hi Pander, Your problem is that this specific font does not conform to WWS conventions. Fontconfig is just displaying the info declared by the font files. You can workaround it at fontconfig level, but it is always worthwhile to get it fixed upstream as your workaround will be only available to fontconfig apps (and only the ones using your specific fontconfig version) This is what the Fedora font checker would tell you about this: Font upstream task, with packager workarounds This WWS-like test checks if font styles use the WWS ?Width (Stretch)?, ?Weight?, ?Slope (Slant/Style)? naming convention?. As noted by Adobe? the W3C CSS font family model is less than ideal, but it is a standard and applications expect it. Since *nix applications do not workaround bad font naming with dynamic renaming heuristics (unlike Microsoft WPF), achieving consistent naming requires fixing it directly in the font files. For this reason we test font style naming separately from font family naming, and do not support complex weight abbreviations and suffixes?. To pass this test make sure style names do not include any qualifier not defined in the WWS white-paper?, and that ?Width (Stretch)?, ?Weight?, ?Slope (Slant/Style)? are defined only once. Any other face qualifier belongs in the font family name. If one your font files is listed here please ask its upstream to fix its naming so it respects WWS conventions and does and does not need further reprocessing. Packager workaround: patch the file (if it is available in .sfd format), or add a fontconfig rule to your package to hide the problem?. ? http://blogs.msdn.com/text/attachment/2249036.ashx http://blogs.adobe.com/typblography/typotechnica2007/Font%20names.pdf ? http://blogs.adobe.com/typblography/atypi2006/CSS%20&%20OT%2015.pdf ? As defined in the end of the WWS renaming algorithm described in the Microsoft whitepaper. ? cf the ?fontpackages? remapping template; unfortunately this workaround won''t fix problems for non-fontconfig applications, or when interoperating with other systems. See also http://git.fedorahosted.org/git/fontpackages.git?p=fontpackages.git;a=tree;f=fontconfig-templates -- Nicolas Mailhot