Move fonts language Provides to Langpacks
Summary
Move Provides: font(:lang=...)
from fonts packages into the langpacks
package,
giving predictable default fonts for language scripts.
Motivation
Currently in Fedora fonts packages have auto-generated font(:lang=...)
provides, which can be used as a dependency identifier to satisfy font coverage required for a certain language requirement. This can be used by GTK applications to install missing fonts via PackageKit for example. However in practice this has not been very useful since usually there are multiple assorted fonts that provide the language coverage and so an arbitrary fonts of unknown quality would get selected, so the mechanism is not reliable.
This change instead moves font(:lang=xy)
provides to langpacks-core-font-xy
which pulls in the expected default font for that language, to give reliable predictable default fonts for each language and improve the user application experience around fonts.
Owner
- Name: Akira TAGOH, Parag Nemade
- Email: tagoh@redhat.com, pnemade@redhat.com
- Release notes owner:
Current status
- Targeted release: Fedora 32
- Last updated: 2020-01-30
- Tracker bug: #1792463
- Release Notes tracker: #433
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 very 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 no guarantee 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 can be particularly problematic when composing ISOs, eg including EPEL.
So this Change proposal aims to improve the user experience around font dependencies by consolidating the Provides: font(:lang=*)
tags into the langpacks-core-font-*
subpackages of the langpacks
package instead. The subpackages already pull in the default font (and locale and input-method) for each language. Once all the Provides:
tags are moved to these subpackages, whenever a missing glyph font installation is requested, the langpacks-core-font-<lang>
package will get installed which will pull in default font using the existing Requires:
tag.
Currently font provides are auto-generated using fc-query by rpm like this:
$ fc-query -f %{=pkgkit} /usr/share/fonts/dejavu/DejaVuSans.ttf font(dejavusans) font(:lang=aa) font(:lang=ab) ...
and at the font package build time, it is transformed to:
Provides: font(dejavusans) Provides: font(:lang=aa) Provides: font(:lang=ab) ...
After this proposal is implemented, the result will become just:
Provides: font(dejavusans)
and instead Provides: font(:lang=...)
will be added to the corresponding sub-packages langpacks-core-font-*.
So asking for a font for a certain language through PackageKit will be achieved by langpacks-core-font-* instead of a random font package.
Benefit to Fedora
This proposal will provide more reliable, predictable, and consistent fonts installation.
Scope
- Proposal owners:
- Update fontconfig to drop generating
font(:lang=...)
from the alias of the formatter for%{=pkgkit}
Provides: font(:lang=...)
will be added to eachlangpacks-core-font-...
subpackage.
For instance,langpacks-core-font-hi
will haveProvides: font(:lang=hi)
.
- Update fontconfig to drop generating
- Other developers: Release Engineers needs to rebuild all fonts packages with the updated fontconfig package.
- Release engineering: #9132
- List of deliverables: None
- Policies and guidelines: None
- Trademark approval: None
Upgrade/compatibility impact
When upgrading some additional packages may get installed to pull in the correct requested default fonts for a language,
if the langpacks-core-font-*
subpackage isn't already installed. In practice very few packages depend on font(:lang=*)
, so in practice the impact should be small and will correct the loosely chosen font.
How To Test
Use this test case https://fedoraproject.org/wiki/QA:Testcase_default_font_installation
User Experience
Users should see better quality fonts for the chosen 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