Open Bug 617878 Opened 14 years ago Updated 2 years ago

There is no way to control the default font in a HTML signature

Categories

(Thunderbird :: Message Compose Window, defect)

x86_64
Windows Vista
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: will.pittenger1+mozbugzilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

I prefer Times New Roman as my default font.  However, I have found there is no way to specify the font for the signature ahead of time.  You have to wait until the message is in the New Message window.

I tried both setting the initial font in Tools/Options/Composition/General/HTML/Font and specifying Times New Roman in the HTML source for my signature.  Neither worked.

On a related matter, if a user uses a plain text signature in a HTML e-mail, should the user be given the option of using the default message font in the signature as opposed to the fixed width font normally used for plain text stuff?

Reproducible: Always

Steps to Reproduce:
1. Try to change the default font for HTML signatures.
2.
3.
Actual Results:  
I can control the default font for the message body, but not the signature.

Expected Results:  
You should be able to specify the font for the entire message.

Please, note, while I have 64-bit Windows, TB is a 32-bit build.
Oh, I should note that Bug 606668 is somewhat related.
> I have found there is no way to specify the font for the signature ahead of time.

"HTML signature" is HTML source writen in HTML, and is included in message source of text/html mail or text/html part.
i.e. You can always specify Font family as style attribute value in your HTML signature.
  <p style='font-family: "Arial Black"; ...'>signature text</p>
Note:
<FONT> tag is depriciated in HTML 4.01, and is not supportrd in HTML 5.
> http://www.w3schools.com/tags/tag_font.asp 
Never use <FONT> tag, use CSS instead, in HTML created by yourself, even if Tb's HTML mail composer still uses <FONT> tag and still doesn't utilize CSS well.

> and specifying Times New Roman in the HTML source for my signature. Neither worked.

With <FONT face=...>? Or with correct CSS?

At which?
(a) At new HTML mode composition window with the HTML signature text or file.
(b) Save as draft, close composition window, then;
    (b-1) View draft(both message and message source)
    (b-2) Edit draft
(c) "Send Later" with an Options/Delivery Format at HTML mode composition window,
    and view message(and message source) generated in Outbox of Local Folders.
    (C-1) Delivery Format = Auto Detect
    (C-2) Delivery Format = Rich Text(HTML) Only
    (C-3) Delivery Format = Plain and Rich(HTML) Text

> On a related matter, if a user uses a plain text signature in a HTML e-mail,
> should the user be given the option of using the default message font in the signature (snip)

Any Tb user can freely write his own HTML signature in HTML.
Why simple text only signature should be used even though you are eager to control font-family of your signature used in HTML mail by yourself?
(In reply to Will Pittenger from comment #1)
> Oh, I should note that Bug 606668 is somewhat related.

That bug is independent problem from this bug, unless HTML signature part is touched/altered during mail composition by hand.

Following is geneated draft with;
  Default font of HTML composition : Times New Roman
  HTML signatute : <p style='font-family: "Arial Black";'>signature text</p>
> <html>
>   <head>
>     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
>   </head>
>   <body text="#000000" bgcolor="#FFFFFF">
>     <p><font face="Times New Roman">this is paragraph</font><br>
>     </p>
>     <div class="moz-signature">-- <br>
>       <p style="font-family: &quot;Arial Black&quot;;">
>         signature text
>       </p>
>     </div>
>   </body>
> </html>
This bug : Issues in generating <div class="moz-signature"> block from HTML signature file,
           unless HTML signature part is touched/altered during mail composition by hand.
That bug : Issues at outside of <div class="moz-signature">,
           unless HTML signature part is touched/altered during mail composition by hand.

If HTML signature part is touched/altered after embeding HTML signature file, following <div class="moz-signature"> was generated by draft save.
(1) When Paragraph/Times New Roman is shown, touch "signature text" part.
(2) When Paragraph/Times New Roman is shown, Enter, add "zzzzz" line.
(3) Change to Body Text. When Body/Times New Roman is shown, Enter twice, add "y...y" line.
>     <div class="moz-signature">-- <br>
>       <p style="font-family: &quot;Arial Black&quot;;">
>         signature text</p>
>       <p style="font-family: &quot;Arial Black&quot;;">zzzzz<br>
>       </p>
>       <p style="font-family: &quot;Arial Black&quot;;"><br>
>       </p>
>       yyyyyyyyyyyyyyyyy<br>
This is special case of Bug 606668 in <div class="moz-signature"> when font-family is specified by HTML signature file. 

Is phenomenon like above involved in your problem?
(In reply to WADA from comment #2)
> > I have found there is no way to specify the font for the signature ahead of time.
> 
> "HTML signature" is HTML source writen in HTML, and is included in message
> source of text/html mail or text/html part.
> i.e. You can always specify Font family as style attribute value in your
> HTML signature.
>   <p style='font-family: "Arial Black"; ...'>signature text</p>
> Note:
> <FONT> tag is depriciated in HTML 4.01, and is not supportrd in HTML 5.
> > http://www.w3schools.com/tags/tag_font.asp 
> Never use <FONT> tag, use CSS instead, in HTML created by yourself, even if
> Tb's HTML mail composer still uses <FONT> tag and still doesn't utilize CSS
> well.
> 
> > and specifying Times New Roman in the HTML source for my signature. Neither worked.
> 
> With <FONT face=...>? Or with correct CSS?
> 
> At which?
> (a) At new HTML mode composition window with the HTML signature text or file.
> (b) Save as draft, close composition window, then;
>     (b-1) View draft(both message and message source)
>     (b-2) Edit draft
> (c) "Send Later" with an Options/Delivery Format at HTML mode composition
> window,
>     and view message(and message source) generated in Outbox of Local
> Folders.
>     (C-1) Delivery Format = Auto Detect
>     (C-2) Delivery Format = Rich Text(HTML) Only
>     (C-3) Delivery Format = Plain and Rich(HTML) Text
> 
> > On a related matter, if a user uses a plain text signature in a HTML e-mail,
> > should the user be given the option of using the default message font in the signature (snip)
> 
> Any Tb user can freely write his own HTML signature in HTML.
> Why simple text only signature should be used even though you are eager to
> control font-family of your signature used in HTML mail by yourself?

Any font settings I had in the HTML signature was gone.  I added style="font-family:Times New Roman" to the <html> tag.  Times New Roman became the default font, at least while editing.  Please note the TB version number changed in since this bug was filed.  I'm now on 24.
(In reply to WADA from comment #3)
> (In reply to Will Pittenger from comment #1)
> > Oh, I should note that Bug 606668 is somewhat related.
> 
> That bug is independent problem from this bug, unless HTML signature part is
> touched/altered during mail composition by hand.
> 
> Following is geneated draft with;
>   Default font of HTML composition : Times New Roman
>   HTML signatute : <p style='font-family: "Arial Black";'>signature text</p>
> > <html>
> >   <head>
> >     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
> >   </head>
> >   <body text="#000000" bgcolor="#FFFFFF">
> >     <p><font face="Times New Roman">this is paragraph</font><br>
> >     </p>
> >     <div class="moz-signature">-- <br>
> >       <p style="font-family: &quot;Arial Black&quot;;">
> >         signature text
> >       </p>
> >     </div>
> >   </body>
> > </html>
> This bug : Issues in generating <div class="moz-signature"> block from HTML
> signature file,
>            unless HTML signature part is touched/altered during mail
> composition by hand.
> That bug : Issues at outside of <div class="moz-signature">,
>            unless HTML signature part is touched/altered during mail
> composition by hand.
> 
> If HTML signature part is touched/altered after embeding HTML signature
> file, following <div class="moz-signature"> was generated by draft save.
> (1) When Paragraph/Times New Roman is shown, touch "signature text" part.
> (2) When Paragraph/Times New Roman is shown, Enter, add "zzzzz" line.
> (3) Change to Body Text. When Body/Times New Roman is shown, Enter twice,
> add "y...y" line.
> >     <div class="moz-signature">-- <br>
> >       <p style="font-family: &quot;Arial Black&quot;;">
> >         signature text</p>
> >       <p style="font-family: &quot;Arial Black&quot;;">zzzzz<br>
> >       </p>
> >       <p style="font-family: &quot;Arial Black&quot;;"><br>
> >       </p>
> >       yyyyyyyyyyyyyyyyy<br>
> This is special case of Bug 606668 in <div class="moz-signature"> when
> font-family is specified by HTML signature file. 
> 
> Is phenomenon like above involved in your problem?

Possibly.  I prefer a <hr> tag to the dashes at the start of the moz-signature div.  My signature already generates the <hr>.  But I'm left deleting the dashes.  If I do that before typing something before the moz-signature div, I have to manually edit the source of the message to move the body of the message out of the signature.  So you tell me.
(In reply to Will Pittenger from comment #4)
> Any font settings I had in the HTML signature was gone.
> I added style="font-family:Times New Roman" to the <html> tag.

What do you mean by "<html> tag"?
(a) Added style to HTML tag named <html> in your HTML signature.
(b) Added style to HTML tag named <html> in draft message source,
    by editing file named Draft using Text Editor followed by Repair Folder.

If (a), it's wrong action. <html> tag is always placed at top of text/html mail or text/html part by Tb, then <html> tag in HTML signature file is finally ignored.
Please note that "HTML signature file o Tb" is never HTML Web page nor HTML mail. Content of "HTML signature file" is a part of HTML source which is embed under <body> of generated text/html.

> Times New Roman became the default font, at least while editing.
If (a), perhaps following.
(0) Assume HTML signature = <html style="font-family:Times New Roman">Signature Text</html>
(1) Just after embed of HTML signature file, internal HTML is as follows.
> <html>
>   <head>
>     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
>   </head>
>   <body text="#000000" bgcolor="#FFFFFF">
>   (room for Body Text)
>     <div class="moz-signature">-- <br>
>       <html style="font-family:Times New Roman">Signature Text</html>
>     </div>
>   </body>
> </html>
(2) Because HTML spec is ambiguous on multiple <html> tags, <html> tag under <body> tag etc., style="font-family:Times New Roman" in second <html> tag is used by Tb while mail composing.
(3) Because excess <html> tag is removed upon generating text/html part, style="font-family:Times New Roman" disappears.

Above is applicable to <style> element under <head> in HTML signature file too.
Signature file: <html><head><style>...</style></head><body>Elements for body</body></html>
Internal HTML just after embed of signature file.
> <html>
>   <head>
>     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
>   </head>
>   <body text="#000000" bgcolor="#FFFFFF">
>   (room for Body Text)
>     <div class="moz-signature">-- <br>
>       <html><head><style>...</style></head><body>Elements for body</body></html>
>     </div>
>   </body>
> </html>
Because HTML spec is ambiguous on incorrect nesting of tag, Tb wrongly uses <style>...</style> under <body> while mail composing. However, because it's <head><style>...</style></head> which is placed under <body>, <head><style>...</style></head> part is correctly ignored by HTML parser upon text/html part generation, or at least upon text/html part display.
This is known issue, and IIRC, bug for it already exists.

In both cases, cause is user's misunderstanding about "HTML signature file in Tb", or over and wrong expectation on "HTML signature file in Tb".
<html style="font-family:Times New Roman">
<body>
<hr>
Will Pittenger
<hr>
My e-mail addresses: <a href="mailto:will_pittenger@comcast.com">Comcast (preferred)</a> or <a href="mailto:will.pittenger1@gmail.com">GMail</a>
<hr>
Me on the web:
<ul><li><a href="http://en.wikipedia.org/wiki/User:Will_Pittenger">Wikipedia</a></li>
<li><a href="http://christianmusic.wikia.com/wiki/User:Will_Pittenger">The Christian Music Wiki</a></li>
<li><a href="http://wlps-ge-stuff.ucoz.com/">WLP's Google Earth Stuff and Maps&mdash;A site a run with maps that I publish to Wikimedia Commons and Google Earth KML files.</a></li></ul></body></html>
(In reply to Will Pittenger from comment #7)
Remove following from your HTML signature, because HTML signature is embed in <body> section of HTML mail.
> <html style="font-family:Times New Roman">
> <body>
> </body></html>
If applying font-family to entire your HTML signature is needed, put them in <div>, and specify font-family in <div> tag, according to HTML rules and CSS rules.
> <div style="font-family:Times New Roman">
> HTML tags for your signature, which can be officially placed under <div> under <body>
> </div>
This "<div> and HTML tags under the <div> tag" is embed in <div class="moz-signature"> block of HTML mail.

Anyway, this part is INVALID, because your HTML signature violates HTML rule in HTML mail generated by Tb.
FYI.
As for signature text color, design change has been made in Tb 24. Read bug 917906 comment #1.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.