Installing new fonts

Bedhad has done some great work to allow us to detect when a font is needed and execute a dbus method. It’s not yet finished, but the UI should look something like this:

Actually in gnome-packagekit git, but nothing uses it yet…

 Comments? Suggestions?

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.

38 thoughts on “Installing new fonts”

  1. Can you just feakin install that font? I don’t care one single bit if the package I need is local or not. As far as I’m concerned, the whole Fedora/Ubuntu/whatever repository is installed on my computer.

  2. The font name is missing in the dialog. And I think the most fonts are not installed via a repository but downloaded from the internet. Perhaps this should be supported in the dialog somehow too. But I have no good idea how.

  3. Installing fonts without telling the user might be not that
    good. Imagine somebody sending you a ransom-note type
    document (20 or 30 fonts), you would have completely messed up font menus afterwards.

    I do think one dialog per installation, naming all the missing fonts (or just families?) would be very cool though.

  4. Prior exposure to windows have made me expect a dialog saying “Do you want to search for a suitable font now?” to just open a local file browser. Maybe something like “Search online repositories for a suitable font?”?

  5. Perhaps change Close to Cancel.
    Close are mostly used for Instant Apply windows, while Cancel are used for dialogs like this one.

    A alternative version to the text would be more on a document level (as that’s what you’re dealing with) instead of Application centric.
    “To be viewed correctly, NameOfDocument requires a font that is not available on your system. Would you like to search for it now?”
    (watch out for faulty Swedish grammar there though!) :)

  6. Like other said, you need to provide more info to the user for this dialog to be useful:
    1. what foo_app wants the font for (often people have many windows open and the app name only is not meaningful; plus sometimes people read junk documents not worth any download)
    2. the list of fontnames or scripts the app wants pk to resolve

    Ideally you’d have a checkbox (default on) that says something like “always try to find fonts on app request, and only bother me if you’ve found something worth installing”

  7. @Thomas Anderson
    Prior exposure to windows has made me expect a dialog saying “No suitable font was found” after searching for one. It never seems to bloody work.

    I guess one should learn from this that its value is significantly diminished if it rarely actually finds a font.

    Looks good as a dialogue though.

  8. Now seriously, who cares about the font being downloaded?
    Would anyone really want to click cancel and not be able to see the document?

    You all just care about the font cluttering your font listing later on. But that just means that AbiWord should have a way to download the font for exclusive use in the document and get rid of it later.

  9. From AbiWord’s perspective, I’d say the ideal implementation was:

    – Load the document, notice that we don’t have all the required fonts
    – Ask packagekit if he as them
    – if not, then AbiWord will auto-substitute the font like it does now
    – if yes, then popup the packagekit dialog to ask the user to install it

    Presenting the user a font search dialog that won’t actually find the font is highly frustrating. This approach prevents that.

  10. otte: IMO it would be “impolite” to automatically download stuff from the net and install it without notifying the user. At least I would not want my computer to behave like this without notifying me.

    A “don’t ask again” checkbox would be nice, though. And as uwog said: only display the dialog after searching for and finding the font (the button would have to say “Install” instead of “Search”).

  11. Nice! Suggestions for usability:
    * Make sure all fonts that are missing for a document are shown in a single dialog
    * Automatically search for the fonts and present the results in the same dialog.
    (possibly the option to turn that off if it searches online too)
    * Show the font names and corresponding packages/download locations.
    * Make sure to handle the case when one or more fonts cannot be found.
    * (might be nice) An option to put the font into ~/.fonts ?
    If this is supported, there could be an option to just do it without asking.

  12. @uwog: as this is a session helper, we can have some per-session gconf keys for: enable_font_helper, enable_codec_helper, enable_mime-type_helper. Checking for a font can take a large amount of time (~10 seconds?) and uses the network quite a lot — I’m not keen on applications sending lots of requests every time a document is loaded.

  13. hughsie:

    Why would it need to use network in order to search for a package if the packaging system is not intentionally “broken” in this area (backends that have a good reason not to cache repodata)?

  14. It seems that for every UI example you post, someone (otto here) says “stop asking me questions and install the damn software already”. Perhaps having an optional “install anything automatically” mode is a good idea for those people. But please never make it the only, or default, behaviour.

  15. I think Jon has a point, but make auto install default, auto install that requires chancing a setting to be enabled is not auto install :). Sysadmins might want tighter control for unknown reasons :)

  16. Second wvengen, these are practical ways to make this as painless as possible.

    There should probably be a browse button to optionally locate each font that is not in a repository.

    –Rob

  17. What happens if you cancel?

    Someone above was asking why would you ever want to not install the font, because then you couldn’t read your document. But I think that’s not the way it works. A substitute font will be used. The dialogue (cluebar) should make this obvious, perhaps with some explanatory text, and by changing the Close button to Use Substitute (or whatever).

    Actually, there’s a couple of different scenarios:

    1) You’re trying to view a document that uses a slightly differently shaped sans-serif which your computer does not have. You only want to read the content (perhaps it’s a presentation you’ve downloaded from a website). In this case you’ll be completely happy with a substitute of Vera Sans, and so might decide not to download 20MB of fancy-font.

    2) The document you’re trying to view requires a font that uses symbols that you do not have an adequate substitute for. Different language scripts, mathematical or other symbols. In this case you end up with place-older boxes where the characters would be and certain parts of the document are illegible.

    So, the Missing Font mechanism should make clear that Cancel actually means use-a-substitute, and it should make clear what the consequences of that are, such as the document may become illegible or merely that the font metrics will be different and so will appear different when printed.

    Great to see this kind of integration happening!

  18. Are there technical reasons that makes it impossible to search for the font in question automatically?
    I would like a dialog something like this:
    “AbiWord needs font X and Y to display this document. Install them? Install/Cancel”)

  19. I must agree with other comments. Definitely show the name of the font. Or probably better, a list box with the names of the missing fonts. And yes, rename the cancel button.

  20. Why can’t it search directly and then you can press a button named “Install”? The extra “search” step is not needed in my opinion. Searching in the repository should be pretty fast and doesn’t need internet connection, so it’s no security risk or anything.

  21. @hughsie: it might not matter that a search takes a ‘long time’: as soon as you have found a result in the background, we can show the dialog. When we have the new font, we just relayout the document, and it looks all nice and pretty.

    As for the network traffic: well, if that’s really a problem for some users, then one could disable auto-search by default.

    Whatever solution you come up with: nice work so far!

  22. Great work, except I’m not sure I understand why PK needs 10s to find a font :-/

    I tried it from time to time, and in the manager it takes ages to only get access to the list of say, the accessories category.

    Is it feasible to reduce the lag here, where is it coming from? You mentioned the network I/O, but the cache is already updated from time to time, why would you lookup using the network, or at least try the cache first, maybe?

    (ok, sounds simple to me, but obviously, it certainly is not :p Good job for all your work Richard)

  23. Random brainfart: couldn’t systems on a LAN advertise their (Free) fonts using Avahi so that other pc’s could pick it up in no time without requiring access to the package manager?

  24. Lots of good replies that may make this question moot however does the Gnome HIG say anything about the buttons matching the question?

    “Do you want to search for a suitable font now?”

    Should there be No/Yes buttons instead of Close/Search buttons?

  25. Search automatically. If this takes a long time, have a UI that reflects this taking place.

  26. can X.org install a font on-the-fly anyway? or is this going to be like ‘would you like to install the font?’, ‘yes’, ‘font is installed. restart X and open abiword again’?

  27. @byter: Since you’re too lazy to look it up, here’s what the HIG says:
    “Write button labels as imperative verbs, for example Save, Print. This allows users to select an action with less hesitation. An active phrase also fits best with the button’s role in initiating actions, as contrasted with a more passive phrase. For example Find and Log In are better buttons than than Yes and OK.”

  28. “AbiWord wants to install a font” implies it already has (found) the font, but then I need to click the search button?
    By the way, I like this kind of blogpost, thanks.

Comments are closed.