PackageKit and Pango are now friends

PackageKit in git master has a new trick up its sleeve. Thanks to Behdad, It now optionally installs a gtk-module that integrates with Pango to detect when a document needs a new font installed to render correctly. No code changes are needed to any application using Pango, as all the magic is done in the gtk-module. When used with a session interface like KPackageKit or gnome-packagekit, the following UI is shown:

Font installer
Font installer

I really want a way of being able to say “don’t ask about this language again” if not found so to not piss off the user. I also know my grammar is pretty shitty. All comments and recommendations gratefully received. Thanks.

Published by

hughsie

Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

17 thoughts on “PackageKit and Pango are now friends”

  1. Nice, but as you asked for improvements:

    You properly should the proper response id (GTK_RESPONSE_HELP) for the help button, so that it gets properly aligned to the left. Also the Search button should get some mnemonic for convenience. When using gtk_dialog_add_button() it is as easy as adding an underscore to the search button’s caption string.

  2. This is an incredible first start, thanks to everyone involved.

    Please extend it so the actual document name is shown (a popup with “this document” is meaningless on a cluttered desktop), and it triggers on font file names, not just scripts (so it can be a secure cross-desktop substitute to the w3c @font-face/EOT stuff http://openfontlibrary.org/wiki/Font_linking )

  3. Doesn’t “Cancel” (as in: cancel this action) make more sense than “Close” (this dialog)? It looks to me the GNOME HIG recommends it (see: 3.4.2. Alert Buttons).

  4. Could the search be done (in the background) beforehand? That way a dialog like this will only pop up to ask whether a font should be _installed_ and no one is bothered by a search that will eventually find no fonts to install.

  5. Would it be possible to have an install button that bypassed the search step and simply installed the minimal package required for the fonts? Usability-wise, I don’t think it’s a good idea to present the user with an option between arbitrary packages — on what basis should they decide which one to install? Better leave the option to install an alternative package to more experienced users, e.g. with an “Search for alternative packages” button.

  6. I would even prefer “Ignore” over “Cancel”. The user should not think that not searching for these fonts will stop him from using the document.

    A “do not show again” box might be nice, but even nicer would be if the dialog would be an unobtrusive panel in the first place (“install missing fonts”). This of course would need special support by each application and couldn’t happen automagically like this. But should it really?

    One of my biggest annoyances with GNOME session management just happens to be the amount of dialogs it tends to pop up, often stealing focus from each other and making it all but impossible to continue. This seems like one of those things which could add to the mess, if it’s not handled gracefully by each application.

  7. PK taking care of applications’ needed packages in this way is great!

    I agree with Daniel Schierbeck, with a twist. ( In fact, I think this should be common behaviour ) If a package is needed, search in the background. If packages are found, present a dialog listing the packages, explanation and “Help”, “Search for alternative packages” “Cancel” and “Install”.

    “Search for alternative packages” or, alternatively “Advanced Install” could just open PackageKit with the packages marked for installation. The advanced user could then choose what packages to install, or not to install.
    The tricky bit, with this “Advanced Install”, would perhaps be whether the application should wait for PK to finish installing, since these packages are needed for viewing, playing etc.?

  8. Don’t ask again is as always an inescapable trap just waiting to happen (Oh shit turns out I do need tibetan, now what do I do). I think a better solution overall would be to be less intrusive with the notifications, such as allowing any app to get a notifictaion of this and display a ribbon or similar.

    (Then again, I guess you’ll end up with same thing as the force-feeding of F-Spot that Nautilus and/or Ubuntu has decided I need – since it’s such a horrible app I guess I must have it showed down my throat. Still better than a popup.)

  9. I think this is great!

    I would love to have one feature though (in fontconfig? in Pango?):

    There are fonts I don’t want to show up in menus, because I do not
    need them actively for my documents, I want the glyphs to show up
    though. I would therefore love to install fonts “hidden” or for display only.

  10. I agree with posters above that simply having an “Install” button would be better. If the packages can’t be found, the dialog should say so right away.

    Also, what documentation is the Help button going to provide here? The only reason I can think of _not_ to install the fonts is time or hard drive space, and the help button could explain that, but you could also just put that in the dialog. Not sure which is better for usability.

  11. I also think that instead of asking to search for fonts it should ask for approval to install the font once its been found from the background.

    From personal preference I’d rather see a notification with the option to install or ignore instead of forcing a dialog on me.

    It would be nice if there is a way to ask the user in the future if they would like to have requires software installed automatically rather than being prompted again.

    The same is true for being able to ignore future requests to install missing components. Though this one is a bit more dicey. Hopefully some of my suggestions are of help.

Comments are closed.