MozillaZine

Reliable to use Google-fonts in Thunderbird?

User Help for Mozilla Thunderbird
tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 23rd, 2017, 4:34 am

I'd like to be sure clients see my emails the way I intended, but the list of 'safe' fonts is rather limited.
I'm not much of a code-jockey, but would something like this:
Code: Select all
<style type="text/css">
    @import url('http://fonts.googleapis.com/css?family=Open+Sans');
</style>

in the userContent.css or userChrome.css? And if so: which one?

Help or advice would be highly appreciated!
Arno Peeters
Tape TV Productions

tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 26th, 2017, 5:28 am

::bump::
Arno Peeters
Tape TV Productions

LIMPET235
Moderator

User avatar
 
Posts: 37233
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted March 26th, 2017, 5:35 am

Moving to Thunderbird Support...
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-50.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
RadioYachting. Conficker Test. (Always choose the "Custom" Install.)

tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 27th, 2017, 7:16 am

Anyone?
Arno Peeters
Tape TV Productions

tanstaafl
Moderator

User avatar
 
Posts: 42689
Joined: July 30th, 2003, 5:06 pm

Post Posted March 27th, 2017, 4:52 pm

Those two *.css files effect what is displayed by your email client, not the recipients.

The basic problem is that many email clients let the user (recipient) override what fonts the message use. For example in Thunderbird I set tools -> options -> display -> advanced to specify that Georgia should be used all of the time, and don't check the checkbox to allow messages to use other fonts. So if you sent me a message using a very popular font (to increase the odds I have it installed) it wouldn't matter since I'm configured to always use Georgia. I could also use my userChrome.css file or an add-on to override what font is used in a message I'm viewing. I suspect the best you can do is pick a font that is pre-installed across many different computers, devices and operating systems and then check that a typical message looks good on a variety of displays (smartphone, laptop, large monitor for a desktop, a Mac with a retina display).

http://blog.campaignmaster.co.uk/2013/0 ... afe-fonts/
https://emailsignaturerescue.com/suppor ... -signature

tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 28th, 2017, 3:45 am

You clearly have a point, that's also what I contemplated. But in case I send mail to the numerous clients that have 'allow messages to use other fonts' enabled (which I reckon is a big group), where would I set the font to be displayed? And, back to the main question, would it be possible to use a remote font, like Google fonts?
I guess that if the client isn't able to use it, it surely would be overridden by a default font that is in use.
Arno Peeters
Tape TV Productions

tanstaafl
Moderator

User avatar
 
Posts: 42689
Joined: July 30th, 2003, 5:06 pm

Post Posted March 28th, 2017, 5:37 am

The easiest way would be to use the HTML toolbar to specify the font when composing the message, though you could insert a HTML font tag directly using the insert -> HTML command. https://www.w3schools.com/tags/tag_font.asp

https://stackoverflow.com/questions/135 ... e#13585273 talks about how to import fonts using a CSS stylesheet on a web site. That appears to require storing the fonts on the web server. However https://developers.google.com/fonts/doc ... ng_started seems to describe a simpler scenario using the google fonts api where "all you have to do is add a special stylesheet link to your HTML document, then refer to the font in a CSS style." I suspect you could do that in the HTML message you compose using Thunderbird.

tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 29th, 2017, 9:10 am

Well, that example using Google-fonts works: I simply inserted it in HTML and it gave me instant result!
This might be a beginners question, but except from the 'Attach Signature' where is the place to nest this code as default? Is it possible even?
Arno Peeters
Tape TV Productions

tanstaafl
Moderator

User avatar
 
Posts: 42689
Joined: July 30th, 2003, 5:06 pm

Post Posted March 29th, 2017, 9:47 am

You could place it in a template, and whenever you want to compose a new message select the Templates folder and double-click on the template. See http://kb.mozillazine.org/Message_templates

tapetv

User avatar
 
Posts: 111
Joined: September 27th, 2003, 3:39 am
Location: The Netherlands

Post Posted March 29th, 2017, 9:49 am

Thanks!!!!
Arno Peeters
Tape TV Productions

Return to Thunderbird Support


Who is online

Users browsing this forum: Bing [Bot] and 5 guests