As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 660088 - OpenType sanitizer needs to handle 'name' table, not just replace it
: OpenType sanitizer needs to handle 'name' table, not just replace it
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Jonathan Kew (:jfkthame)
: Milan Sreckovic [:milan]
Depends on: 700057
Blocks: 467669
  Show dependency treegraph
Reported: 2011-05-26 14:35 PDT by Jonathan Kew (:jfkthame)
Modified: 2011-11-05 14:04 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch, support the 'name' table in OTS (13.29 KB, patch)
2011-05-26 14:35 PDT, Jonathan Kew (:jfkthame)
jd.bugzilla: review+
Details | Diff | Splinter Review

Description User image Jonathan Kew (:jfkthame) 2011-05-26 14:35:42 PDT
Created attachment 535479 [details] [diff] [review]
patch, support the 'name' table in OTS

Currently, OTS discards the 'name' table and inserts a set of fixed name strings in all sanitized fonts. This prevents us returning the proper font name when querying the fonts actually used to render content (see bug 467669).

The attached patch fixes this by parsing and serializing the table, so that the font name is not lost during sanitization.

(When we're happy the patch is reasonable, we should submit it upstream to the OTS project.)
Comment 1 User image Jonathan Kew (:jfkthame) 2011-06-10 13:30:32 PDT
I filed this as a feature request in the Chromium tracker, and have just attached the patch there as well to see what they do with it.
Comment 2 User image John Daggett (:jtd) 2011-06-15 07:31:01 PDT
Comment on attachment 535479 [details] [diff] [review]
patch, support the 'name' table in OTS

Code looks reasonable but as I mentioned on IRC I'm still not convinced that all this name table data is really necessary.  It seems like the only data that we currently would need is the fullname data but we're bringing in all name data fields.  But I'm guessing web font vendors are stripping a lot of name table entries so I guess we can adjust this later if it seems to be causing a problem.
Comment 3 User image Jonathan Kew (:jfkthame) 2011-06-15 12:31:05 PDT
Comment 4 User image Jonathan Kew (:jfkthame) 2011-06-15 13:58:45 PDT
This was backed out along with bug 467669 in
Comment 5 User image Jonathan Kew (:jfkthame) 2011-06-15 23:44:21 PDT
And relanded on m-i:
Comment 6 User image Mounir Lamouri (:mounir) 2011-06-17 07:36:02 PDT
Merged in m-c:

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