Sorry for the delay in reply, vacation... Anyway, back to work! :)

On Mon, Oct 9, 2017 at 6:25 PM, <nicolas.mailhot@laposte.net> wrote:


----- Mail original -----
De: "David Kaspar [Dee'Kej]"

> * Regarding the font family names and subpackages -- it's another mess.
> Not just in Fedora (the FPG for fonts are really outdated), but generally

> everywhere.

​Ah, darn it. Apparently I have oversimplified and didn't express myself correctly.​ :-/
 

Since I wrote those, I'd like to qualify this:

1. Fedora basic packaging principles for fonts are sound, since they are based around fontconfig capabilities, OpenType capabilities, and the CSS model (mostly the same thing since fontconfig is architectured around OpneType and the CSS font model). All of those are pillars of any font-manipulating app in Fedora currently and in the near future. If anything they've become stronger requirements since the guidelines were written. The basic CSS font family is a set of faces that only differ in width, weight or slant. Because apps can only apply width, weight or slant attributes to text (not serif or sans-serif or whatever). Since in the past years some advanced apps have gained the ability to select optional opentype features such as advanced ligatures, I'd tend to think files that add those features also belong in the same font family.

To clarify - the FPG for fonts is okay in principles. It just still mentions some things that are no longer used in Fedora's specfiles, or some things are not so clear when reading through them. IMHO, just a regular cleanup/update in the wiki (and maybe unifying all the related wikis into one) should be enough. :) If you wish, we could create a BlueJeans meeting (open for everyone) to go through these guidelines and fix them together. ;) I unfortunately don't have right to edit the wiki, nor I want to mess with something which you maintain(?).​
 
2. Those principles are much better than the Debian ones of a few years ago, that reposed on layers of custom Debian-specific metadata that was supposed to work with every possible font system, working well with none, all very maintainer-intensive. I haven't checked if Debian managed to sort this mess since. What I've seen of the Appstream font spec reeks of the same metadata overlaying, and misunderstanding of the CSS font model. When you reinvent the wheel you can redefine everything. Contrariwise, when you reinvent the wheel you need to maintain your wheel ad vitam eternam + deal with every piece of code not written around your square wheel. Apps are written around fontconfig and the CSS model, not the appstream abstraction, even when developers do not realise it (the CSS model is really pervasive, since it was defined by Microsoft around what monsters like Office did at the time, and has been adopted by the web and web-derived techs since). Even TEX that long stood for its own font model has switched to OpenType lately – gaining access to the vast trove of OpenType fonts trumped being "better" with a limited font set.
Again, I'm OK with the principles, it's just some small things need update in FPG, that's all. I don't want us to reinvent the wheel (again). I agree that fontconfig is good way to go. The only reason why I created the AppStream files is for the 'urw-base35-font's to be available in Gnome-software if possible, so users can possibly preview them before installing them. That's the only actuall benefit I see from AppStream files for fonts in Fedora. (+1 for moving to OTF/TTF.)​​
 
3. Therefore, I would caution against anything that proposed abandoning the CSS font model and redefined the font family/font faces split of the CSS model. A strength of our guidelines is that our package split follows a logical font family split which is understood both by users and the application code.

​I'm not proposing abandoning what we have in Fedora. I would like to just to have the FPG updated. For example IIRC, there was a suggestion somewhere there, to use fontforge to display the font family, and then to use that font family name for the font subpackage. However, this contradicts what you wrote about the CSS model and the width/weight/slant. That's why I think we should update the FPG and unite them. ;)​
 
4. However there are many broken fonts out there. The metadata of actual font files may be suboptimal upstream, requiring font packagers to understand the limits of ideal (application-wise) font families, and fixing the metadata of the fonts we ship either by patching the fonts of via fontconfig directives. This is a major PITA but we can't avoid it if we want the fonts we ship to work well in apps. So :
– font files differ only in width, weight, slant, or optional OpenType features → same font family, belongs in the same package
— font files differ in another stylistic attribute → different font families in practical terms, the best and most advanced app will still treat them as different (even if they have a close human name such as DejaVu Sans and DejaVu Serif)
– font files are split by encoding or region → they still are a logical unit that belongs in a single package. Helping people install part of a font is a source of multiple bugs (that disincentives checking that all the parts wall together, and is an i18n disaster)
– the metadata says otherwise, because of legacy technical limitations or because the font author was confused → the metadata needs to be fixed, either by patching the font or via fontconfig overrides (and past fontconfig maintainers worked with us to define good templates for those)

​​I'm not aware of this being in FPG.
 

Now, for the bad part of our font packaging:

— all Fedora font packages were not converted a few years ago. Some maintainers proved resistant (gs is a good example) and I got tired of nagging them.

– it's been a long time anyone checked all the distro font packages. It's unfortunately probable some FPG deviations have been introduced since, because the packagers didn't understand the guidelines, were confused by broken upstream font metadata, or cargo culted special font formats (most everything works with OpenType nowadays, including CSS fonts. IE6 is deader than dead).

— someone need to figure an appstream style compatible with our guidelines, document it and make it part of our packaging

– we couldn't go as far as I wanted last time due to rpm limitations. rpm has improved a lot since. It would be worthwhile to revisit macros and scriptlets to take advantage of new rpm features I think this does not require patching individual packages since the macros are centralized in one place

— likewise, fontconfig improved. It would be nice to change the autoprovides to take the fontconfig files shipped in the package into account, which was not possible in the past. Right now rpm evaluates the font against minimal system fontconfig rules, that the package itself is likely to override.

– a lot of the font packaging tooling was broken by the dnf migration, it needs refreshing (I haven't found the time to do it yet, I suck loads, feel free to replace it with something better).

– likewise the packaging templates need to be refreshed with general FPG changes of the past years (nothing critical, just a general refresh).

​ Again, could we schedule a meeting for all fonts maintainers to discuss this, and update the FPG if needed? And maybe create some Fedora project for this, and start working on these changes for F28?​

===========

​@Reindl - yes you​'re right, I juste learned about it after sending that e-mail... :D So, right now we have the latest version of hylafax+ in Fedora. :)

​@Nico - that's good to hear. Anyway, the hylafax+ should be tested in Rawhide first for stability issues.​