Hi,

Thank you Igor for your review.

On Thu, Jan 2, 2020 at 10:52 PM Igor Gnatenko <ignatenkobrain@fedoraproject.org> wrote:
I think it would be useful to mention in the change page that
langpacks-core-* already depend on "good quality font". If that is
already there, I apologize.


I think this is covered under "User Experience" section.

Another thing which is not mentioned on the change page is that you
are going to drop Requires: font(:lang=…) from fontconfig (otherwise
it is going to pull all langpacks-core-* packages).


Yes, once fontconfig updated, mass rebuild of all packages providing some kind of "Provides: font(:lang=<langcode>)" will drop that dependency.
I think this has been mentioned in Scope section.

Otherwise I'm happy with this change since this will finally solve the
problem where you install some game like teeworlds, get some fonts
pulled in and autoremove will never remove it since fontconfig depend
on font(:lang=xx) and libsolv never auto-removes "alternative"
packages. So you never remove fonts unless explicitly ask DNF to do
so.


Regards,
Parag

On Thu, Jan 2, 2020 at 4:17 PM Ben Cotton <bcotton@redhat.com> wrote:
>
> https://fedoraproject.org/wiki/Changes/FontLanguageProvidesToLangpacks
>
> == Summary ==
> Move `Provides: font(:lang=...)` from fonts packages into the
> `langpacks` package,
> giving predictable default fonts for language scripts.
>
> === Motivation ===
> Currently fonts packages has auto-generated `font(:lang=...)`
> provides, which can be used as a dependency identifier to satisfy font
> coverage required for a certain language requirement. This is used by
> GTK application to install missing fonts via PackageKit for example.
> However in practice it has not been very useful since usually there
> are assorted multiple fonts that provide the language coverage and so
> an arbitrary fonts of unknown quality would get selected, so the
> mechanism is not unreliable.
>
> This change uses instead the default fonts chosen in `langpacks` for
> each language, to give reliable predictable default fonts for each
> language and improve the user application experience around fonts.
>
> == Owner ==
> * Name: [[User:Tagoh| Akira TAGOH]], [[User:Pnemade| Parag Nemade]]
> * Email: tagoh@redhat.com, pnemade@redhat.com
>
>
> == Detailed Description ==
> The language based metadata for fonts packages was introduced in
> Fedora 11.  The idea being to provide a mechanism to find and install
> a font for missing glyphs through PackageKit and was useful for
> minority languages which might be missing default installed fonts
> packages.  But the user experience was generally not terribly good.
>
> Users cannot predict which fonts will be installed. This often leads
> to poor fonts choices installed, particularly for languages with too
> many available fonts such as English, since the first font found
> lexically will be arbitrarily chosen with gurantee of quality or
> expected style.
> This random dependency resolution sometimes introduces highly
> unexpected results too - for example a font from an external
> repository may get chosen by chance. This would be particularly
> problematic when composing ISOs, eg when including EPEL.
>
> So this Changes proposal aims to improve the user experience around
> font dependencies by moving the meta-provides the `langpacks` package
> instead. Langpacks contains various dependencies to use for certain
> languages, including dependencies for default fonts. so it will
> resolve the above issues.
>
> Specifically speaking, currently font provides are generated like this:
> <pre>
> $ fc-query -f %{=pkgkit}  /usr/share/fonts/dejavu/DejaVuSans.ttf
> font(dejavusans)
> font(:lang=aa)
> font(:lang=ab)
> ...
> </pre>
>
> and at the build time, it is transformed to:
> <pre>
> Provides: font(dejavusans)
> Provides: font(:lang=aa)
> Provides: font(:lang=ab)
> ...
> </pre>
>
> After this proposal, the above result will be:
> <pre>
> Provides: font(dejavusans)
> </pre>
>
> and then add `Provides: font(:lang=...)` line to corresponding
> sub-packages langpacks-core-*.
>
> So asking for a font for a certain language through PackageKit will be
> achieved by langpacks-core-* instead of a random font package.
>
> == Benefit to Fedora ==
> This proposal will provide reliable, predictable, and consistent font
> dependencies.
>
> == Scope ==
> * Proposal owners:
> ** Update fontconfig to drop `font(:lang=...)` from the alias of the
> formatter for `%{=pkgkit}`
> ** Add a line of `Provides: font(:lang=...)` to each
> `langpacks-core-...`. For instance, `Provides: font(:lang=hi)` needs
> to be added to `langpacks-core-hi`.
>
> * Other developers: Release Engineers needs to rebuild all fonts
> packages with the updated fontconfig package.
> * Release engineering: [https://pagure.io/releng/issue/9132 #9132]
> * Policies and guidelines: None
> * Trademark approval: None
>
>
> == Upgrade/compatibility impact ==
> Some packages may be installed after upgrading if corresponding
> langpacks-core-* packages isn't yet installed.
>
> == How To Test ==
> # Check that langpacks-core-* provide corresponding `font(:lang=...)`
> using `rpm -q --provides`.
> # Check that fonts packages no longer provide `font(:lang=...)`.
> # Check that langpacks-core-* pulls in the default expected font for
> the language.
>
> == User Experience ==
> Users should see better fonts chosen for languages when they install a
> font to cover a certain language script through PackageKit or through
> font meta dependencies of other packages.
>
>
> == Dependencies ==
> All fonts packages
>
> == Contingency Plan ==
> * Contingency mechanism: proposal owners will revert all the changes
> and rebuild all fonts packages to add back the provides.
>
> * Contingency deadline: the beta freeze
> * Blocks release? No
> * Blocks product? N/A
>
> == Documentation ==
> N/A
>
> --
> Ben Cotton
> He / Him / His
> Fedora Program Manager
> Red Hat
> TZ=America/Indiana/Indianapolis
> _______________________________________________
> devel-announce mailing list -- devel-announce@lists.fedoraproject.org
> To unsubscribe send an email to devel-announce-leave@lists.fedoraproject.org
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org