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
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 | Review

Description 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 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.

http://code.google.com/p/chromium/issues/detail?id=83706
Comment 2 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 Jonathan Kew (:jfkthame) 2011-06-15 12:31:05 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/a4659906bcfb
Comment 4 Jonathan Kew (:jfkthame) 2011-06-15 13:58:45 PDT
This was backed out along with bug 467669 in
http://hg.mozilla.org/integration/mozilla-inbound/rev/ed3cf3967b69
Comment 5 Jonathan Kew (:jfkthame) 2011-06-15 23:44:21 PDT
And relanded on m-i:
http://hg.mozilla.org/integration/mozilla-inbound/rev/2d24929f1d65
Comment 6 Mounir Lamouri (:mounir) 2011-06-17 07:36:02 PDT
Merged in m-c:
http://hg.mozilla.org/mozilla-central/rev/2d24929f1d65

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