Bug 140681 - [Win] [SVG-> OTF Converter] Flip the switch on
Summary: [Win] [SVG-> OTF Converter] Flip the switch on
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 140592
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-20 09:46 PST by Brent Fulgham
Modified: 2016-03-22 10:25 PDT (History)
3 users (show)

See Also:


Attachments
Patch (15.30 KB, patch)
2015-01-20 11:06 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (14.68 KB, patch)
2015-01-20 11:10 PST, Brent Fulgham
mmaxfield: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.