SVG image using a font specified via @font-face doesn't use the font after it loads

RESOLVED FIXED

Status

()

Core
Layout: Text
RESOLVED FIXED
9 years ago
4 years ago

People

(Reporter: Alex, Assigned: dbaron)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20081206 Minefield/3.2a1pre
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20081206 Minefield/3.2a1pre

When a SVG file references a font via a @font-face rule, Firefox downloads the font but doesn't refresh the document to use it (it keeps using the fallback font), you have to zoom in or out a step to get the document to use the font.

Even if the document can't be zoomed, zooming is still required to get the fonts to show.

Reproducible: Always

Steps to Reproduce:
1. Load image in URL field
2. Observe the 4 X's taken from the fallback font
3. Zoom in or out a single step
4. Observe the 4 X's turn into characters from the Ahem font.
Actual Results:  
Image refreshes to use linked font after zooming

Expected Results:  
Should refresh when the font finishes loaded, not after zooming.
(Assignee)

Comment 1

9 years ago
Created attachment 351693 [details]
copy of testcase (requires downloading and setting up with Ahem.ttf)

I made a copy of the testcase that still ought to work if you have Ahem installed locally at http://dbaron.org/tmp/reftest/Ahem.svg .  I'm attaching it as well (although without a copy of the font).

This bug seems to be fixed by the patch in bug 458878, although I'm actually not sure why at first glance.
(Assignee)

Updated

9 years ago
Depends on: 458878
(Assignee)

Updated

9 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

9 years ago
Assignee: nobody → dbaron

Comment 2

6 years ago
I created a test page for SVG 1.1 files using CSS to display @font-face referenced fonts within an image. The SVG file is rendered next to a reference image. A number of browsers were tested to see how they perform. In my latest testing, Firefox 11.0a1 (Nightly 2011-12-09) does not display the font correctly within the SVG file.

See
http://aharon.varady.net/browser-test/browser-test-for-hebrew-diacritics-test3.html

Comment 3

6 years ago
(In reply to Aharon from comment #2)
> I created a test page for SVG 1.1 files using CSS to display @font-face
> referenced fonts within an image. The SVG file is rendered next to a
> reference image. A number of browsers were tested to see how they perform.
> In my latest testing, Firefox 11.0a1 (Nightly 2011-12-09) does not display
> the font correctly within the SVG file.
> 
> See
> http://aharon.varady.net/browser-test/browser-test-for-hebrew-diacritics-
> test3.html

In particular, the fonts tested are Unicode Hebrew fonts, so this test also is a test of BIDI RTL (bidirectional right-to-left) text.

Comment 4

4 years ago
Works now that svgtext is enabled.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Depends on: 655877
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.