Last Comment Bug 468237 - SVG image using a font specified via @font-face doesn't use the font after it loads
: SVG image using a font specified via @font-face doesn't use the font after it...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: David Baron :dbaron: ⌚️UTC-7 (busy September 14-25)
:
Mentors:
http://alex.thefrapp.com/files/font_f...
Depends on: 458878 svgtext
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-06 06:58 PST by Alex
Modified: 2013-07-01 07:20 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
copy of testcase (requires downloading and setting up with Ahem.ttf) (569 bytes, image/svg+xml)
2008-12-06 09:11 PST, David Baron :dbaron: ⌚️UTC-7 (busy September 14-25)
no flags Details

Description Alex 2008-12-06 06:58:39 PST
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.
Comment 1 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2008-12-06 09:11:53 PST
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.
Comment 2 Aharon 2011-12-09 16:08:16 PST
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 Aharon 2011-12-09 16:23:53 PST
(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 Robert Longson 2013-07-01 07:20:59 PDT
Works now that svgtext is enabled.

Note You need to log in before you can comment on or make changes to this bug.