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    

Nicolas Mailhot
Reported 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). http://fedoraproject.org/wiki/Features/AutomaticFontInstallation 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.
Attachments
Frédéric Wang (:fredw)
Comment 1 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 https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux and after bug 133604, "Latin Modern Math" is tried as the default font. Gecko's bug is https://bugzilla.mozilla.org/show_bug.cgi?id=467729 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: https://bugzilla.mozilla.org/show_bug.cgi?id=619521
Martin Robinson
Comment 2 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.
Frédéric Wang (:fredw)
Comment 3 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.
Note You need to log in before you can comment on or make changes to this bug.