Bug 22621

Summary: RFE: Add font autoinstallation support
Product: WebKit Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: alex, fonts-bugs, fred.wang, gyuyoung.kim, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 133604    
Bug Blocks: 38377, 114565    

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.