After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787759 - Show more information
Show more information
Status: RESOLVED FIXED
Product: gnome-font-viewer
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-font-viewer-maint
gnome-font-viewer-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-16 14:50 UTC by Matthias Clasen
Modified: 2017-09-26 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add more general information (3.05 KB, patch)
2017-09-16 14:51 UTC, Matthias Clasen
none Details | Review
Do multiline labels differently (1.36 KB, patch)
2017-09-16 14:52 UTC, Matthias Clasen
none Details | Review
Add font variation information (3.64 KB, patch)
2017-09-16 14:52 UTC, Matthias Clasen
none Details | Review
Show OpenType layout features (42.99 KB, patch)
2017-09-16 14:52 UTC, Matthias Clasen
none Details | Review
Add a details tab (5.31 KB, patch)
2017-09-16 14:52 UTC, Matthias Clasen
none Details | Review
how it looks (37.74 KB, image/png)
2017-09-16 14:53 UTC, Matthias Clasen
  Details
how it looks, 2 (30.65 KB, image/png)
2017-09-16 14:53 UTC, Matthias Clasen
  Details
Add more general information (3.05 KB, patch)
2017-09-16 23:10 UTC, Matthias Clasen
committed Details | Review
Do multiline labels differently (1.43 KB, patch)
2017-09-16 23:10 UTC, Matthias Clasen
committed Details | Review
Add font variation information (4.12 KB, patch)
2017-09-16 23:11 UTC, Matthias Clasen
committed Details | Review
Show OpenType layout features (42.91 KB, patch)
2017-09-16 23:11 UTC, Matthias Clasen
committed Details | Review
Add a details tab (5.33 KB, patch)
2017-09-16 23:11 UTC, Matthias Clasen
committed Details | Review
Pull out the OpenType data (15.82 KB, patch)
2017-09-16 23:11 UTC, Matthias Clasen
none Details | Review
Pull out the OpenType data (15.84 KB, patch)
2017-09-16 23:58 UTC, Matthias Clasen
none Details | Review
Pull out the OpenType data (16.14 KB, patch)
2017-09-17 00:05 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2017-09-16 14:50:51 UTC
Admittedly, this is a bit font nerdy, but I like to be able to see some detailed information about fonts, like what OpenType features they expose, how many glyphs they contain, and if there are multiple styles available.
Comment 1 Matthias Clasen 2017-09-16 14:51:54 UTC
Created attachment 359890 [details] [review]
Add more general information

Display designer, manufacturer, license and glyph count.
This is generally interesting information about a font.
Comment 2 Matthias Clasen 2017-09-16 14:52:11 UTC
Created attachment 359891 [details] [review]
Do multiline labels differently

I think we should show multiple lines of text when it is
present. Cutting things off is just rude. But we don't
want to break the UI by producing an enormous dialog,
so don't allow more than 10 lines per label.
Comment 3 Matthias Clasen 2017-09-16 14:52:20 UTC
Created attachment 359892 [details] [review]
Add font variation information

Display the available axes and named instances.
Comment 4 Matthias Clasen 2017-09-16 14:52:30 UTC
Created attachment 359893 [details] [review]
Show OpenType layout features

Making such font features visible is the first step towards
getting them to be exposed and used in appliations, where
appropriate.
Comment 5 Matthias Clasen 2017-09-16 14:52:40 UTC
Created attachment 359894 [details] [review]
Add a details tab

The OpenType details are fairly obscure, and mainly
interesting to font nerds. Move them to a separate
tab so they don't clutter the info dialog.
Comment 6 Matthias Clasen 2017-09-16 14:53:15 UTC
Created attachment 359895 [details]
how it looks
Comment 7 Matthias Clasen 2017-09-16 14:53:37 UTC
Created attachment 359896 [details]
how it looks, 2
Comment 8 Jeremy Bicha 2017-09-16 15:26:32 UTC
(In reply to Matthias Clasen from comment #7)
> Created attachment 359896 [details]
> how it looks, 2

I think it would be more consistent for "Glyph Count" and "Color Glyphs" to use Title Case too.
Comment 9 Cosimo Cecchi 2017-09-16 20:24:57 UTC
Review of attachment 359890 [details] [review]:

Thanks, looks good with this small comment. (Should probably also branch for gnome-3-26 before pushing this, which reminds me I need to do a release...)

::: src/font-view.c
@@ +316,3 @@
+    {
+        char *s = g_strdup_printf ("%ld", face->num_glyphs);
+        add_row (grid, _("Glyph count"), s, FALSE);

Agreed that these should probably use title case too.
Comment 10 Cosimo Cecchi 2017-09-16 20:26:17 UTC
Review of attachment 359891 [details] [review]:

::: src/font-view.c
@@ +179,2 @@
     gtk_label_set_max_width_chars (GTK_LABEL (label), 64);
+    gtk_label_set_width_chars (GTK_LABEL (label), 64);

Does this not make the dialog always wide?
Comment 11 Cosimo Cecchi 2017-09-16 20:32:43 UTC
Review of attachment 359892 [details] [review]:

::: src/font-view.c
@@ +192,3 @@
+describe_axis (FT_Var_Axis *ax)
+{
+  return g_strdup_printf (_("%s %g — %g, default %g"), ax->name,

This really needs a comment for translators explaining the various specifiers

@@ +193,3 @@
+{
+  return g_strdup_printf (_("%s %g — %g, default %g"), ax->name,
+                          FixedToFloat(ax->minimum),

Missing spaces before paren

@@ +228,3 @@
+is_valid_subfamily_id (guint id)
+{
+        if (FT_Get_Sfnt_Name (face, i, &sname) != 0)

Where do these magic numbers come from? It would be nice to use defines, or have a link to some documentation

@@ +232,3 @@
+
+static void
+

Prefer one argument per line

@@ +236,3 @@
+    if (is_valid_subfamily_id (ns->strid)) {
+        char *str = get_sfnt_name (face, ns->strid);
+            continue;

I'd prefer to consolidate the logic here, and make str = _("Instance %d") when empty/invalid, with a single call to append it to the GString at the end of the function

@@ +385,3 @@
     add_row (grid, _("Color glyphs"), FT_HAS_COLOR (face) ? _("yes") : _("no"), FALSE);
+
+    if (FT_Get_MM_Var (face, &ft_mm_var) == 0) {

ft_mm_var is leaked AFAICT
Comment 12 Cosimo Cecchi 2017-09-16 20:35:54 UTC
Review of attachment 359893 [details] [review]:

Commit message has a typo ("appliations")

::: src/font-view.c
@@ +257,3 @@
+  const char *tag;
+  const char *name;
+} named_features[] = {

How did you make this list? Would be nice to be able to recreate it (or even better, if there was an API somewhere that we could use to do this for us!)
Comment 13 Cosimo Cecchi 2017-09-16 20:36:58 UTC
Review of attachment 359894 [details] [review]:

Looks good
Comment 14 Matthias Clasen 2017-09-16 23:10:42 UTC
Created attachment 359907 [details] [review]
Add more general information

Display designer, manufacturer, license and glyph count.
This is generally interesting information about a font.
Comment 15 Matthias Clasen 2017-09-16 23:10:59 UTC
Created attachment 359908 [details] [review]
Do multiline labels differently

I think we should show multiple lines of text when it is
present. Cutting things off is just rude. But we don't
want to break the UI by producing an enormous dialog,
so don't allow more than 10 lines per label.
Comment 16 Matthias Clasen 2017-09-16 23:11:08 UTC
Created attachment 359909 [details] [review]
Add font variation information

Display the available axes and named instances.
Comment 17 Matthias Clasen 2017-09-16 23:11:18 UTC
Created attachment 359910 [details] [review]
Show OpenType layout features

Making such font features visible is the first step towards
getting them to be exposed and used in appliations, where
appropriate.
Comment 18 Matthias Clasen 2017-09-16 23:11:27 UTC
Created attachment 359911 [details] [review]
Add a details tab

The OpenType details are fairly obscure, and mainly
interesting to font nerds. Move them to a separate
tab so they don't clutter the info dialog.
Comment 19 Matthias Clasen 2017-09-16 23:11:51 UTC
Created attachment 359912 [details] [review]
Pull out the OpenType data

This commit moves the OpenType feature tags list to a separate
file that can more easily be shared with other users. It also
completes the list to have all registered tags from the spec.
Comment 20 Matthias Clasen 2017-09-16 23:12:43 UTC
Thanks for the reviews.
I think I've addressed all feedback in the new series.
Comment 21 Matthias Clasen 2017-09-16 23:58:12 UTC
Created attachment 359913 [details] [review]
Pull out the OpenType data
Comment 22 Matthias Clasen 2017-09-17 00:05:58 UTC
Created attachment 359914 [details] [review]
Pull out the OpenType data
Comment 23 Cosimo Cecchi 2017-09-18 18:09:04 UTC
Review of attachment 359907 [details] [review]:

Thanks, looks good to me. gnome-3-26 is branched, so you can push this to master.
Comment 24 Cosimo Cecchi 2017-09-18 18:09:32 UTC
Review of attachment 359908 [details] [review]:

OK
Comment 25 Cosimo Cecchi 2017-09-18 18:11:32 UTC
Review of attachment 359909 [details] [review]:

Looks good
Comment 26 Cosimo Cecchi 2017-09-18 18:12:23 UTC
Review of attachment 359910 [details] [review]:

Looks good to me (not sure why there's another copy of font-view.c in this patch though)
Comment 27 Cosimo Cecchi 2017-09-18 18:13:15 UTC
Review of attachment 359911 [details] [review]:

OK
Comment 28 Cosimo Cecchi 2017-09-18 18:14:51 UTC
Review of attachment 359914 [details] [review]:

Nice, thanks!
Comment 29 Matthias Clasen 2017-09-19 03:29:00 UTC
Attachment 359907 [details] pushed as 3b35b8a - Add more general information
Attachment 359908 [details] pushed as c44df5b - Do multiline labels differently
Attachment 359909 [details] pushed as 96a51ff - Add font variation information
Attachment 359910 [details] pushed as 5eabb1f - Show OpenType layout features
Attachment 359911 [details] pushed as c3a4ed3 - Add a details tab
Attachment 359914 [details] pushed as 3e00abb - Pull out the OpenType data
Comment 30 Piotr Drąg 2017-09-19 16:03:02 UTC
(In reply to Cosimo Cecchi from comment #26)
> Review of attachment 359910 [details] [review] [review]:
> 
> Looks good to me (not sure why there's another copy of font-view.c in this
> patch though)

It looks like this one fell through the cracks.
Comment 31 Piotr Drąg 2017-09-26 10:05:19 UTC
(In reply to Piotr Drąg from comment #30)
> (In reply to Cosimo Cecchi from comment #26)
> > Review of attachment 359910 [details] [review] [review] [review]:
> > 
> > Looks good to me (not sure why there's another copy of font-view.c in this
> > patch though)
> 
> It looks like this one fell through the cracks.

Fixed in https://git.gnome.org/browse/gnome-font-viewer/commit/?id=7e8950c83ea2e0ba82720770cff79714f4d1c827