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 634226 - use Cantarell font
use Cantarell font
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Owen Taylor
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-07 16:04 UTC by William Jon McCann
Modified: 2011-01-19 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hard coded cantarell for UI. Decrease humongous 16px to a reasonable size. (1.39 KB, patch)
2010-12-14 01:48 UTC, Jakub Steiner
none Details | Review
scale up the symbolic icons again so they aren't fuzzy (5.59 KB, patch)
2010-12-14 12:18 UTC, Jakub Steiner
none Details | Review
Hard code Cantarell as the default UI font. (2.29 KB, patch)
2011-01-08 19:06 UTC, William Jon McCann
needs-work Details | Review
Hard code Cantarell as the default UI font. (4.09 KB, patch)
2011-01-19 16:41 UTC, Owen Taylor
committed Details | Review

Description William Jon McCann 2010-11-07 16:04:33 UTC
We have a GNOME UI font now so we should probably start to use it for all UI.  Not sure if this means setting it for the default Sans or using it in css directly.
Comment 1 Jakub Steiner 2010-12-14 01:46:54 UTC
In addition, the default size for the panel and menus is 16px, which seems quite an overshot. While I don't think hardcoding the font in the stylesheet is ultimately the way to go, attached is a patch to do that.

There are number of things we could do better here -- have one place to define the font-family and have that cascade everywhere (I don't believe such parent element exists). Also defining only a base size in absolute units (if we're not going to pick it up from the environment's application-font for example as bug #631767 suggests) and then defining the rest in relative % to that size might be a good idea.
Comment 2 Jakub Steiner 2010-12-14 01:48:16 UTC
Created attachment 176386 [details] [review]
hard coded cantarell for UI. Decrease humongous 16px to a reasonable size.
Comment 3 Jakub Steiner 2010-12-14 12:18:54 UTC
Created attachment 176398 [details] [review]
scale up the symbolic icons again so they aren't fuzzy
Comment 4 Florian Müllner 2010-12-14 16:54:57 UTC
Review of attachment 176398 [details] [review]:

::: data/theme/gnome-shell.css
@@ +148,3 @@
+
+  .popup-menu-icon {
+      icon-size: 1.34em;

This looks dishonest :-)

If you want the icons to be 16px, make them 16px ...
Comment 5 Jakub Steiner 2010-12-14 17:42:32 UTC
Sure I want them crisp by default. But on the other hand, I wouldn't want to hardcode the size of the icons in absolute units should we chose to support accessible themes for example. Feels like the best solution.
Comment 6 William Jon McCann 2011-01-08 19:06:15 UTC
Created attachment 177844 [details] [review]
Hard code Cantarell as the default UI font.

- also shrink the humongous 16px panel and menu size to a reasonable 14.
- scale up the icons to be 16px by default again
Comment 7 Dan Winship 2011-01-12 20:32:07 UTC
Based on a very brief investigation (prompted by a comment on d-d-l), it looks like if you try to use Cantarell with LANG=vi_VN.utf8, you're going to get an ugly mix of Cantarell and DejaVu glyphs. We might want to make the default font name be _()ed, and then just call st_theme_context_set_font(), rather than having it in the CSS.
Comment 8 Owen Taylor 2011-01-12 20:51:41 UTC
(In reply to comment #7)
> Based on a very brief investigation (prompted by a comment on d-d-l), it looks
> like if you try to use Cantarell with LANG=vi_VN.utf8, you're going to get an
> ugly mix of Cantarell and DejaVu glyphs. We might want to make the default font
> name be _()ed, and then just call st_theme_context_set_font(), rather than
> having it in the CSS.

The way it is really supposed to work (basically) is that Cantarell should be added to the to of the system sans-serif alias, and we should use sans-serif, and then fontconfig will note that the font doesn't support the locale's font and pick a different lower in the alias.

That's not very feasible in the current jhbuild-gnome environment, but certainly the minimum thing we should try to do is to keep the Cantarell reference in one place using 'stage { font-family: Cantarell, sans-serif; }' and font-size rather than having it throughout the file to make for easy distribution patching.
Comment 9 Owen Taylor 2011-01-13 17:22:57 UTC
Comment on attachment 177844 [details] [review]
Hard code Cantarell as the default UI font.

Marking needs work - I don't think we need to take danw's approach at the moment, but the current patch misses a large amount of the UI - message tray, most of the overview, etc. The right approach for now is to set the font family with

 stage {
    font-family: ...;
 }

Then in other places only override what we need with with font-size: and font-weight: rather than respecifying the font family with a font: abbreviation.
Comment 10 Owen Taylor 2011-01-19 16:41:51 UTC
Created attachment 178750 [details] [review]
Hard code Cantarell as the default UI font.

- specify an overall font-family for all children of the stage and
  for places where we just want to use a size, use font-size.
- also shrink the humongous 16px panel and menu size to a reasonable 14.
- scale up the icons to be 16px by default again

Based on a patch by Jakub Steiner <jimmac@gmail.com>
Comment 11 Owen Taylor 2011-01-19 17:06:23 UTC
Attachment 178750 [details] pushed as 961fdd8 - Hard code Cantarell as the default UI font.