[teampractices] Change the font of incoming Gmails

Bryan Davis bd808 at wikimedia.org
Thu Aug 25 03:53:14 UTC 2016


On Wed, Aug 24, 2016 at 4:56 PM, Max Binder <mbinder at wikimedia.org> wrote:
> Recently, this list had a thread for what email fonts are easier to read,
> based on the following article:
> http://www.bloomberg.com/news/articles/2015-07-27/your-e-mail-font-is-ruining-your-life
>
> I tried it, it didn't work for me (I like consistent fonts), but I was
> dismayed to discover that, when others did keep the change, I couldn't
> change incoming email fonts to control my own user experience. Firefox has a
> setting to disallow sites setting unique fonts, via
>
> preferences/content/fonts/advanced
>
> but that doesn't affect Gmail incoming messages.
>
> The fix I found: a Firefox (and Chrome) add-on called Stylish. That, coupled
> with a few tweaks to an existing community-created style, allowed me to
> revert incoming fonts to "Sans Serif" (Google's vanity name for "Arial").
> This also keeps things like italics and bold and all those goodies we like
> to use for emphasis.

I do something similar but probably more invasive using a greasemonkey
script [0]. Gmail seems to do some funky rewriting of HTML messages to
sandbox the styles that the message includes by make a metric ton of
<span> and <font> tags with inline styles. My script actually strips
all "style", (font)"face", and "size" attributes from the tags in the
gmail rendered message body. The script also loads a style sheet [1]
that sets the body font to Input Mono [2] which is a nice monospace
font from the font family that I also use as my system font [3].

</font nerdery>

[0]: https://github.com/bd808/userscripts/blob/gh-pages/gmail.user.js
[1]: https://github.com/bd808/userscripts/blob/gh-pages/gmail.user.css
[2]: http://input.fontbureau.com/
[3]: http://input.fontbureau.com/systemfont/

Bryan
-- 
Bryan Davis              Wikimedia Foundation    <bd808 at wikimedia.org>
[[m:User:BDavis_(WMF)]]  Sr Software Engineer            Boise, ID USA
irc: bd808                                        v:415.839.6885 x6855



More information about the teampractices mailing list