Bug 22621 - RFE: Add font autoinstallation support
Summary: RFE: Add font autoinstallation support
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Enhancement
Assignee: Nobody
Depends on: 133604
Blocks: 38377 114565
  Show dependency treegraph
Reported: 2008-12-03 00:52 PST by Nicolas Mailhot
Modified: 2014-07-20 07:46 PDT (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Mailhot 2008-12-03 00:52:07 PST
The Linux platform is gaining an on-demand font autoinstallation framework (BSD
and Solaris will probably follow eventually).


Webkit browsers should be plugged into it and use it to request the fonts the pages they render need. This would have a huge user impact, especially for pages that have strong i18n constrains.

Unlike proposals such as @font-face and EOT the fonts are sourced from trusted
user-controlled sources, are properly vetted legal-side, use the latest font
versions not old obsolete ones (with bug fixes), and are installed system-wide
where other apps can take advantage of them.
Comment 1 Frédéric Wang (:fredw) 2014-06-21 01:31:11 PDT
This might be useful for the MathML support. Currently, the status of OpenType MATH fonts on Linux is


and after bug 133604, "Latin Modern Math" is tried as the default font.

Gecko's bug is


and there is a patch there that could be used as an example.

The main issue here is to decide how to detect missing fonts and to determine which fonts to ask PackageKit to install. There is a patch here in Gecko:

Comment 2 Martin Robinson 2014-06-21 15:26:30 PDT
Since WebKitGTK+ is an embedding library and not a browser, this should probably be handled by distributions that make the packages or by browsers that actually embed WebKit. Perhaps the answer is different for other WebKit ports.
Comment 3 Frédéric Wang (:fredw) 2014-06-22 01:06:58 PDT
It seems to me that if we want this feature, WebKit should at least expose an API to register a callback for "missing fonts" that would provide some info about the font needed to render a visited page. Then browsers can use that to call PackageKit.

Note that math is a bit different than "human" language. In general, Linux distributions are localized and thus contains the appropriate fonts for the script of the current language, so autoinstallation would only be for languages other than the one of the system. For math, we don't really have a way to know if the user of the system is interested in math, even if the fact that a TeX distribution is installed (and thus Latin Modern Math) is one possibility. Autoinstallation would allow to guess that by checking that Math(ML) pages are visited.