Bug 140681

Summary: [Win] [SVG-> OTF Converter] Flip the switch on
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: Layout and RenderingAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on: 140592    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch mmaxfield: review+

Description Brent Fulgham 2015-01-20 09:46:33 PST
[SVG -> OTF Converter] Flip the switch on (Windows)
Comment 1 Radar WebKit Bug Importer 2015-01-20 11:01:02 PST
<rdar://problem/19534744>
Comment 2 Brent Fulgham 2015-01-20 11:06:22 PST
Created attachment 244999 [details]
Patch
Comment 3 Brent Fulgham 2015-01-20 11:10:15 PST
Created attachment 245000 [details]
Patch
Comment 4 Brent Fulgham 2015-01-20 11:11:10 PST
Comment on attachment 245000 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245000&action=review

> Source/WebCore/svg/SVGToOTFFontConversion.cpp:791
> +    const unsigned featureCount = 5;

MSVC doesn't allow you to use a variable as the argument to an array declaration.
Comment 5 Brent Fulgham 2015-01-20 11:19:18 PST
It looks like:
(1) We still have differences in SVG after turning this on.
(2) FontCustomPlatformData::fontPlatformData is asserting because m_fontReference is null when running e.g., 'svg/W3C-SVG-1.1/animate-elem-03-t.svg'

Will investigate further.
Comment 6 Brent Fulgham 2015-01-20 14:58:57 PST
Debugging further, it looks like the buffer generated by convertSVGToOTFFont may be different in some way.

If I pass this buffer through the Windows AddFontMemResourceEx method, it fails.

However, the original code path works.
Comment 7 Brent Fulgham 2015-01-20 15:32:41 PST
It appears that only font data produced by the ENABLE(SVG_OTF_CONVERTER) code path in CSSFontFaceSource.cpp suffer from this issue (convertSVGToOTFFont).
Comment 8 Myles C. Maxfield 2015-01-20 17:51:52 PST
(In reply to comment #6)
> Debugging further, it looks like the buffer generated by convertSVGToOTFFont
> may be different in some way.
> 
> If I pass this buffer through the Windows AddFontMemResourceEx method, it
> fails.
> 
> However, the original code path works.

Different than what?

By "original code path," do you mean "with the converter off?"
Comment 9 Brent Fulgham 2016-03-22 10:25:50 PDT
This patch is no longer needed. The feature was turned on in r197145 <http://trac.webkit.org/changeset/197145>.