Page MenuHomePhabricator

Since Gerrit 3.2, gitiles monospaced text is bold
Closed, ResolvedPublicBUG REPORT


The monospaced text (commit messages and code) in new Gerrit gitiles pages appears bold.

gerrit_bold.png (936×960 px, 76 KB)

This appears to be coming from a rule in base.css:

.u-pre {
  font-size: 10pt;
  font-weight: 500;
  white-space: pre;

Unsetting font-weight in this rule results in normal-weight text.

gerrit_notbold.png (936×960 px, 71 KB)

Link to our gitiles with Gerrit's own fonts:

Link to the same file in the same commit on gerrit-review with 3rd party fonts:

Event Timeline

[04:13:29] <AntiComposite>	 is everything supposed to be bold in new gerrit gitiles?
[07:22:26] <andre__>	 AntiComposite: where exactly (URL) to see "everything in bold"?
[07:38:50] <legoktm>	 andre__: I'm guessing it's on pages like where the entire commit message looks bolded...
[07:39:20] <legoktm>	 I can't tell if it's actually bolded or that's just how the font looks like
[07:56:02] <Nemo_bis>	 Apparently it's because of the use of "Roboto Mono Medium". Once I disable the custom fonts, the page looks fine.
[08:41:53] <qchris>	 AntiComposite: Yes, fonts on gitiles have changed. Before (on previous gerrit) fonts got loaded from Google. That's not what we want for various reasons (E.g.: T240264). So we switched gitiles to the fonts that Gerrit itself provides.
[08:41:53] <stashbot>	 T240264: Gerrit loads font from and -
[08:42:04] <qchris>	 That way we can avoid the loading from 3rd party resources.
[08:42:38] <qchris>	 But on the flip-side: Gerrit does not provide all fonts that we want in all the weights that we want. So gitiles looks a bit different.
[08:43:10] <qchris>	 If it's a concern to you, please file a bug on phabricator so we can discuss with others.
[08:49:26] <Nemo_bis>	 Very nice to avoid loading fonts from third parties.
[08:50:05] <Nemo_bis>	 (I never loaded them in the first place so gitiles was presumably using system fonts for me.)
Aklapper renamed this task from New Gerrit gitiles monospaced text is bold to Since Gerrit 3.2, gitiles monospaced text is bold.Jun 29 2020, 7:18 AM

Change 609547 had a related patch set uploaded (by QChris; owner: Christian Aistleitner):
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gitiles plugin to v3.2.2-1-g00c5ca0-with-0e3b533

Change 609547 merged by QChris:
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gitiles plugin to v3.2.2-1-g00c5ca0-with-0e3b533

QChris claimed this task.

Fix is deployed and works.

QChris changed the subtype of this task from "Task" to "Bug Report".Jul 5 2020, 10:34 PM