From Fedora Project Wiki
Line 63: Line 63:


== Detailed Description ==
== Detailed Description ==
The language based meta information about font dependency was introduced since Fedora 11. that was helpful to find out a font for missing glyphs through PackageKit and was useful for minority languages because we didn't have fonts packages for them so much. but the user experience wasn't that better under the certain condition.
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 can't predict what fonts will be installed. this may gives us worst result particularly when no fonts for the requested language is installed and/or is majority languages that has too many fonts such as English, because this logic doesn't guarantee the quality of fonts nor preferred fonts we expect to get installed by default.
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 sometimes introduces unexpected result too so that it's likely to happen that dependencies may be satisfied from external repositories. this may particularly be a problem when composing ISOs.
This random dependency 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 replacing it to Langpacks instead. Langpacks contains various dependencies to use for certain languages, including dependencies for default fonts. so it will resolves the above issues.
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 dependency is generated like this:
Specifically speaking, currently font dependency is generated like this:
Line 79: Line 79:
</pre>
</pre>


and at the build time, it is transformed to:<pre>
and at the build time, it is transformed to:
<pre>
Provides: font(dejavusans)
Provides: font(dejavusans)
Provides: font(:lang=aa)
Provides: font(:lang=aa)
Provides: font(:lang=ab)
Provides: font(:lang=ab)
...</pre>
...
</pre>


After this proposal, the above result will be:
After this proposal, the above result will be:

Revision as of 07:56, 27 December 2019


Font Dependencies to Langpacks

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 multiple varied fonts providing coverage for languages and so an arbitrary fonts of unknown quality would get selected, so the mechanism is not unreliable.

This change uses instead the default fonts selected in langpacks for each language, to give reliable predictable default fonts for each language and improve the user application experience around fonts.

Owner

  • Name: Akira TAGOH
  • Email: tagoh@redhat.com
  • Release notes owner:

Current status

  • Targeted release: Fedora 32
  • Last updated: 2019-12-27
  • Tracker bug: <will be assigned by the Wrangler>

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 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 dependency is generated like this:

$ fc-query -f %{=pkgkit}  /usr/share/fonts/dejavu/DejaVuSans.ttf
font(dejavusans)
font(:lang=aa)
font(:lang=ab)
...

and at the build time, it is transformed to:

Provides: font(dejavusans)
Provides: font(:lang=aa)
Provides: font(:lang=ab)
...

After this proposal, the above result will be:

Provides: font(dejavusans)

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 provides reliable, predictable, and consistencies in dependencies about fonts.

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) need to be added to langpacks-core-hi.
  • Other developers: Release Engineers needs to rebuild all of fonts packages with the updated fontconfig package.
  • 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

  1. Check dependencies in langpacks-core-*. they must have corresponding Provides: font(:lang=...) line when asking with rpm -q --provides.
  2. Check dependencies in fonts packages. they must contain no Provides: font(:lang=...) lines

User Experience

Users may see better fonts for certain language when they need to install a set of fonts for certain language support through PackageKit or package dependencies from others.


Dependencies

All of fonts packages

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Proposal owners will revert all of changes and rebuild all of fonts packages to add back deps
  • Contingency deadline: the beta freeze
  • Blocks release? No
  • Blocks product? N/A

Documentation

N/A

Release Notes