need to figure out a way to skip the downloading of eot files

RESOLVED WONTFIX

Status

()

defect
RESOLVED WONTFIX
11 years ago
4 years ago

People

(Reporter: jtd, Assigned: jtd)

Tracking

Trunk
x86
macOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

()

This is a follow-on bug from bug 465452.  Basically, because IE does not support the format hint syntax within the @font-face src descriptor, authors that want to write pages that support cross-platform fonts need to write @font-face rules for .eot fonts that don't contain a format hint.

@font-face {
  font-family: test;
  src: url(test.ttf) format("truetype"), url(test.eot);
}

But without a format hint we are forced to download the .eot file before rejecting it.  Safari rejects all src url's with a .eot extension but dbaron feels we should really be relying on MIME types instead.

See comments 10-16 in bug 465452.

Steps:

1. Load the URL

Expected/Desired Result: the .eot font in the "Two clauses in src descriptor" example should never be downloaded

Result: .eot font is downloaded when font fallback occurs for 'A'
> @font-face {
>   font-family: test;
>   src: url(test.ttf) format("truetype"), url(test.eot);
> }
> Expected/Desired Result: the .eot font in the "Two clauses in src descriptor"
> example should never be downloaded
Why? IE will ignore the "Two clauses in src descriptor" rule anyway. You can add |format("embedded-opentype")| to avoid download.
As far as I foresee, we have the following two different cases.

Case 1. The web author has read http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/ carefully and thus uses the following CSS code:

/* Font definition for Internet Explorer */
/*         (*must* be first)             */
@font-face {
  font-family: Gentium;
  src: url(Gentium.eot) /* can't use format() */;
}
 
/* Font definition for other browsers */
@font-face {
  font-family: Gentium;
  src: url(Gentium.ttf) format("opentype"); /* ingnored by IE: format() */
}

Case 2. The web author believes that IE is the only browser and thus uses the following CSS code:

@font-face {
  font-family: Gentium;
  src: url(Gentium.eot);
}

In the first case, Firefox should ignore and forget the first @font-face after the second @font-face is understood: the second @font-face effectively replaces the first. (The actual font download should be postponed to the monent CSS is understood entirely.)

In the second case, bug 520357 should be fixed and Firefox should happily take EOT Lite as the necessary font file, if nothing better is given. (If EOT is not Lite, then bad luck, but that happens when content is analysed, not MIME.)
Note: Firefox should probably not ignore and forget the first @font-face after
the second @font-face is encountered and understood, if bug 465414 is fixed and if glyph fallback happens across multiple @font-face rules defining the same font with different 'src'.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.