From Fedora Project Wiki
 
(26 intermediate revisions by 4 users not shown)
Line 21: Line 21:
  
 
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->
 
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->
= Font Dependencies to Langpacks <!-- The name of your change proposal --> =
+
= Move fonts language Provides to Langpacks <!-- The name of your change proposal --> =
  
 
== Summary ==
 
== Summary ==
Line 28: Line 28:
  
 
=== Motivation ===
 
=== 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.
+
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 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.
+
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 ==
 
== Owner ==
Line 37: Line 37:
 
This should link to your home wiki page so we know who you are.  
 
This should link to your home wiki page so we know who you are.  
 
-->
 
-->
* Name: [[User:Tagoh| Akira TAGOH]]
+
* Name: [[User:Tagoh| Akira TAGOH]], [[User:Pnemade| Parag Nemade]]
 
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
 
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
* Email: tagoh@redhat.com
+
* Email: tagoh@redhat.com, pnemade@redhat.com
 
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
 
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
 
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
 
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
Line 60: Line 60:
 
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
 
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
 
-->
 
-->
* Tracker bug: <will be assigned by the Wrangler>
+
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1792463 #1792463]
 +
* Release Notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/433 #433]
  
 
== Detailed Description ==
 
== 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.
+
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 gurantee of quality or expected style.
+
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 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.
+
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 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.
+
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.
  
Specifically speaking, currently font dependency is generated like this:
+
Currently font provides are auto-generated using fc-query by rpm like this:
 
<pre>
 
<pre>
 
$ fc-query -f %{=pkgkit}  /usr/share/fonts/dejavu/DejaVuSans.ttf
 
$ fc-query -f %{=pkgkit}  /usr/share/fonts/dejavu/DejaVuSans.ttf
Line 79: Line 80:
 
</pre>
 
</pre>
  
and at the build time, it is transformed to:
+
and at the font package build time, it is transformed to:
 
<pre>
 
<pre>
 
Provides: font(dejavusans)
 
Provides: font(dejavusans)
Line 87: Line 88:
 
</pre>
 
</pre>
  
After this proposal, the above result will be:
+
After this proposal is implemented, the result will become just:
 
<pre>
 
<pre>
 
Provides: font(dejavusans)
 
Provides: font(dejavusans)
 
</pre>
 
</pre>
  
and then add `Provides: font(:lang=...)` line to corresponding sub-packages langpacks-core-*.
+
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-* instead of a random font package.
+
So asking for a font for a certain language through PackageKit will be achieved by langpacks-core-font-* instead of a random font package.
 
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
 
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
This proposal will provide reliable, predictable, and consistent font dependencies.
+
This proposal will provide more reliable, predictable, and consistent fonts installation.
  
 
<!-- What is the benefit to the distribution?  Will the software we generate be improved? How will the process of creating Fedora releases be improved?
 
<!-- What is the benefit to the distribution?  Will the software we generate be improved? How will the process of creating Fedora releases be improved?
Line 130: Line 131:
 
== Scope ==
 
== Scope ==
 
* Proposal owners:
 
* Proposal owners:
** Update fontconfig to drop `font(:lang=...)` from the alias of the formatter for `%{=pkgkit}`
+
** Update fontconfig to drop generating `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`.
+
** `Provides: font(:lang=...)` will be added to each `langpacks-core-font-...` subpackage. <br/> For instance, `langpacks-core-font-hi` will have `Provides: font(:lang=hi)`.
 
 
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
  
 
* Other developers: Release Engineers needs to rebuild all fonts packages with the updated fontconfig package. <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 
* Other developers: Release Engineers needs to rebuild all fonts packages with the updated fontconfig package. <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 151: Line 150:
  
 
== Upgrade/compatibility impact ==
 
== Upgrade/compatibility impact ==
Some packages may be installed after upgrading if corresponding langpacks-core-* packages isn't yet installed.
+
When upgrading some additional packages may get installed to pull in the correct requested default fonts for a language,
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
+
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.
 
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 
  
 
== How To Test ==
 
== How To Test ==
<!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done.  If it needs to be tested with different hardware or software configurations, indicate them.  The more specific you can be, the better the community testing can be.
+
Use this test case https://fedoraproject.org/wiki/QA:Testcase_default_font_installation
 
 
Remember that you are writing this how to for interested testers to use to check out your change implementation - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your change.
 
 
 
A good "how to test" should answer these four questions:
 
 
 
0. What special hardware / data / etc. is needed (if any)?
 
1. How do I prepare my system to test this change? What packages
 
need to be installed, config files edited, etc.?
 
2. What specific actions do I perform to check that the change is
 
working like it's supposed to?
 
3. What are the expected results of those actions?
 
-->
 
 
 
# 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 ==
 
== 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.
+
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.
  
 
<!-- If this change proposal is noticeable by users, how will their experiences change as a result?
 
<!-- If this change proposal is noticeable by users, how will their experiences change as a result?
Line 217: Line 198:
 
-->
 
-->
  
[[Category:ChangePageIncomplete]]
+
[[Category:ChangeAcceptedF32]]
 
<!-- When your change proposal page is completed and ready for review and announcement -->
 
<!-- When your change proposal page is completed and ready for review and announcement -->
 
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
 
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->

Latest revision as of 03:59, 30 January 2020


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

Current status

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 each langpacks-core-font-... subpackage.
      For instance, langpacks-core-font-hi will have Provides: font(:lang=hi).
  • Other developers: Release Engineers needs to rebuild all fonts packages with the updated fontconfig package.
  • 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

Release Notes