GNOME Bugzilla – Bug 407605
Exposing more useful font metadata in gnome-font-viewer
Last modified: 2017-09-19 03:33:48 UTC
Currently gnome-font-viewer only grabs and displays the version, copyright and description fields of a font. Very often the information present in these fields is scarce or incomplete. Fonts have various other metadata fields which can be usefully displayed to get more information. See http://scripts.sil.org/IWS-Chapter08#3054f18b-6fa45f30. gnome-font-viewer should take advantage of existing metadata fields to display more useful information to the users and allow them to know more about their fonts (what is the license, who has designed them, etc) like it it the case on other desktops. Fields like license, license-url, designer, designer-url, trademark should be added.
Created attachment 82483 [details] [review] Exposing more metadata fields Initial patch to add license_url, designer, designer_url and trademark fields. Ideally text boxes should adapt better and urls should be clickable and we could expose bigger fields (like the license) with a expander closed by default.
Thanks for the patch. Looks good to me for the most part. A few nitpicky comments: * please limit line length to something sensible * I don't like the "Designer(s):" and (especially) "Designer(s) URL:" strings * plus, you don't even use those two consistently
Thanks for the comments. It was a rough initial patch. I'll refine it. What problem do you see with the Designer-related fields?
They are pretty much unsuited for being translated. Just cutting the "(s)" would be ok, I guess.
Created attachment 83253 [details] [review] refined patch, with size and position tweaks to the dialog Since the dialog is now showing more fields, I increased the size and made it center by default.
Ok, some comments: * the last patch is a little broken (and doesn't even compile); easy to fix, though * making the window center doesn't make sense to me * it might make sense to keep the window smaller by default, and only show (some of) the additional information in an expandable area or something * you're currently wasting a lot of space by making everything multiline, even if it doesn't need to * have a look at GtkLinkButton for the URLs * that said, maybe the XXX and XXX URL fields could even be merged and be shown as one; they probably should
Created attachment 94808 [details] [review] size adjustments, row rework, URL support OK. here's a new patch with various fixes. The centering is a usability choice, and it makes much more sense to me that the forced origin top-left default. Centering on parent feels better as AFAICT previewing a font is an action done inside the font folder. What would be the rationale for a top-left placement? I limited the creation of new inner rows to fields likely to contain paragraphs of text. Any pointers on forcing longer lines to wrap at a certain size? Any pointers on using expanders? Certain fonts have lines which are too long. There's a wide variety of combinations used in fonts. Showing what is essential without taking too much space is not trivial. I tweaked the sizes accordingly. I've added support for license_URL and designer_URL in the form of a row with the links following the corresponding row but without the redundant row title. Comments very welcome.
Created attachment 94809 [details] screenshot of gnome-font-viewer exposing more font metadata for GFS Artemisia
Created attachment 94810 [details] screenshot of gnome-font-viewer exposing more font metadata for Charis SIL
Created attachment 94811 [details] screenshot of gnome-font-viewer exposing more font metadata for Dejavu
*** Bug 477784 has been marked as a duplicate of this bug. ***
Created attachment 95913 [details] [review] updated patch Here's an update that fixes a few minor issues and * undoes the size increases. ...set_width_request sets the minimum size which is just wrong. If the widgets need more space they'll request it themselves. * undoes the centering. The default is not top-left but whatever the window manager thinks is best. And the WM can certainly decide better than we can. * makes labels wrap (could still be improved, though, I believe) * makes sure we have labels if the License/Designer fields are not set, but the URLs are For expanders, take a look at GtkExpander.
It is a very useful feature (at the minimum license field has to be added) and I hope it will be included soon.
Nicolas, are you still working on this?
Yes, still working on it.
Nice to have indeed. Lets finish the patch and get this in.
I was tackling some resizing and wrapping problems. Many fonts I've tested agains have rather problematic text wrapping... But in the meantime, since the whole fontilus folder including the thumbnailer and the viewer code was deleted in trunk with the drop of the VFS methods where should this now go?
Good question. If Gnome needs a small font viewer like this, the best place to put it would be gnome-utils, I guess. Or we could just decide to leave the field to "third-party" apps like gnome-specimen. Don't know. Maybe we should put this up for discussion on the d-d-l mailing list.
OK. I'll work on adjusting the existing code to fit in the gnome-utils tree. Where is the thumbnailing of font files done? I'm not the only one who thinks such a viewer is needed for GNOME. We should include an improved viewer instead of just dropping the functionality because of the gvfs move. For a possible common font utility with more features: See the upstream gnome-specimen bug about flagging up metadata: https://bugs.launchpad.net/gnome-specimen/+bug/127047 There is also some code in the serif project: http://code.google.com/p/serif/wiki/Serif Alberto Ruiz is tackling updates to the font widget itself: http://aruiz.typepad.com/siliconisland/2008/08/font-selection.html
(In reply to comment #19) > OK. I'll work on adjusting the existing code to fit in the gnome-utils tree. Note that it might be a good idea to ask the gnome-utils people first. > Where is the thumbnailing of font files done? What do you mean? > I'm not the only one who thinks such a viewer is needed for GNOME. We should > include an improved viewer instead of just dropping the functionality because > of the gvfs move. I agree a font viewer is useful. I don't really agree that the old fonts:// was useful, and as such I don't think it makes sense to reimplement it in gio. In any event, the control center wasn't really the best to put this functionality in the first place.
Created attachment 128047 [details] [review] Updated patch The font-viewer folder is back in svn so here's an updated patch to expose more metadata when wiewing the font. For usability reasons and because of the size of the dialog there are extra changes: dropping the selectability of the name, clickable links for URL fields, dropping the size information (not essential), adding a title to the window, making it bigger and centered. The wrapping seems to behave for the various fonts I've tried wiewing. I didn't grok how to make use of expanders but we should probably move to glade for future versions.
Nicolas, got screenshot?
Created attachment 128055 [details] screenshot of gnome-font-viewer exposing more font metadata for Liberation
Created attachment 128057 [details] screenshot of gnome-font-viewer exposing more font metadata for Euterpe
Created attachment 128058 [details] screenshot of gnome-font-viewer exposing more font metadata for Cortoba
Created attachment 128059 [details] screenshot of gnome-font-viewer exposing more font metadata for Dejavu
Created attachment 128060 [details] screenshot of gnome-font-viewer exposing more font metadata for Sheherazade
Created attachment 139331 [details] [review] updated patch http://blogs.gnome.org/thos/2009/07/26/re-adding-fonts-in-gnome/ prompted me to try to update my miserable little patch trying to expose more useful font metadata and make the links clickable. (Also adding a more understandable title and some minor rewording of the output messages). I tried to play with the sizes but it's not quite there. A glade approach is probably what we need to take into account the variability of the fields across the many fonts out there. Anyway, it may be the start for something better so I'm attaching it. Issues to deal with: - alignement - hard-wrapping of some fields - conflicting callback signals - use of expanders/twisties. Please cluebat and fix. I need to learn.
Created attachment 139332 [details] screenshot of CMU
Created attachment 139333 [details] screenshot of Dejavu
Created attachment 139334 [details] screenshot of Inconsolata notice how the mime type that is picked up is the wrong one "ODF template" instead of OpenType font because unfortunately the OOo project has ignored that .otf pre-existed their new template extension and has created a conflict.
Created attachment 139335 [details] screenshot of Ubuntu-title
Created attachment 139336 [details] screenshot of Cantarell
(In reply to comment #31) > notice how the mime type that is picked up is the wrong one "ODF template" > instead of OpenType font http://bugs.freedesktop.org/show_bug.cgi?id=20854#c7
*** Bug 598735 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > See > http://scripts.sil.org/IWS-Chapter08#3054f18b-6fa45f30. BTW this list is missing the WWS names
-> gnome-utils gnome-font-viewer has now moved to gnome-utils, reassigning.
Adjusting bug status. Any chance of this getting any attention? The metadata URLs are increasingly useful. Thanks.
Please don't modify the GNOME target field, it's meant to be used for blocker bugs of the whole GNOME release.
*** Bug 633805 has been marked as a duplicate of this bug. ***
We show more information now. Please reopen if you miss anything in particular.