Last Comment Bug 580860 - font-face rules are not included in complete page save as
: font-face rules are not included in complete page save as
Status: ASSIGNED
:
Product: Firefox
Classification: Client Software
Component: File Handling (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Felipe Corrêa da Silva Sanches
:
Mentors:
http://incaseofstairs.com/tests/font-...
Depends on:
Blocks: 115634
  Show dependency treegraph
 
Reported: 2010-07-21 19:49 PDT by Kevin Decker
Modified: 2016-06-22 11:13 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
initial implementation with wrong naming of downloaded font files (2.69 KB, patch)
2010-11-24 05:33 PST, Felipe Corrêa da Silva Sanches
no flags Details | Diff | Splinter Review

Description Kevin Decker 2010-07-21 19:49:30 PDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1

When using the Save Page As feature, Firefox 4.0b1 does not save the associated font files into the local _files directory or update the associated url for the local file path.

Reproducible: Always

Steps to Reproduce:
1. Browse to http://incaseofstairs.com/tests/font-face-render/
2. Save Page As from the file menu
3. Save the page
4. Examine the local file that was saved as a result of this operation.
Actual Results:  
The font file is not saved and the render has to default over to the the default font face.

Expected Results:  
The font is accessible on the local file system and the local file is rendered the same as the remote version.
Comment 1 philippe (part-time) 2010-07-21 21:45:53 PDT
Probably for the same reason as background-images and the like.
Confirming as I don't find any bug on this.
Comment 2 Felipe Corrêa da Silva Sanches 2010-11-24 05:30:46 PST
I am working on a patch for it. It already finds every @font-face rule in <style> nodes and downloads the font files. The current patch has an issue with the naming of the files though. It is saving the files with .asc suffix (and _002.asc, _003.asc for files that have repeated basename). Any idea how to handle that? I dont know why it's dropping the file extensions that are declared in the url descriptors.
Comment 3 Felipe Corrêa da Silva Sanches 2010-11-24 05:33:44 PST
Created attachment 492976 [details] [diff] [review]
initial implementation with wrong naming of downloaded font files
Comment 4 Felipe Corrêa da Silva Sanches 2011-01-10 17:05:20 PST
I still need some feedback on how to fix the wrong naming of downloaded font files.
Comment 5 Elbart 2014-04-12 10:26:03 PDT
Would be nice to have this for websites which show bugs only with webfonts, i.e. bug 994923.
Comment 6 Matthias Versen [:Matti] 2014-10-05 10:14:06 PDT
clearing this old and ignored needinfo to clear my dashboard
Comment 7 John Daggett (:jtd) 2014-10-29 19:25:01 PDT
Comment on attachment 492976 [details] [diff] [review]
initial implementation with wrong naming of downloaded font files

Saving links referenced by the src array of @font-face rules is definitely something necessary to save webfonts but this feature will require a lot more than just that. Webfonts are lazy loaded, so stylesheets can include definitions of webfont resources that are never used on a page. I think the save code would need to look at the fonts used on the page and store those under reworked names.

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