Bug 20846
| Summary: | Initial and generic font families are undefined for SVGs used as images | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | mitz |
| Component: | Images | Assignee: | Fujii Hironori <fujii.hironori> |
| Status: | REOPENED | ||
| Severity: | Normal | CC: | simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.5 | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=68090 https://bugs.webkit.org/show_bug.cgi?id=191834 |
||
| Bug Depends on: | |||
| Bug Blocks: | 20847 | ||
mitz
SVGImage creates a Page to hold the SVG document, but standardFontFamily and the generic font families are empty in that page's settings. It is not obvious where to take the values for those settings from for an SVG image.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
mitz
This bug became apparent after <http://trac.webkit.org/changeset/36382>.
mitz
See also bug 68090.
Fujii Hironori
Pull request: https://github.com/WebKit/WebKit/pull/38003
EWS
Committed 287903@main (42425440a334): <https://commits.webkit.org/287903@main>
Reviewed commits have been landed. Closing PR #38003 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/141560077>
mitz
No way to add a regression test for this?
Fujii Hironori
I don't remember why I didn't add a layout test case.
It seems to be possible by using internals.settings.setStandardFontFamily().
Will take a look.
Fujii Hironori
Re-opening for pull request https://github.com/WebKit/WebKit/pull/50693
Fujii Hironori
SVG Image disables user installed fonts. Thus, I can't use Ahem font for layout tests. This makes difficult to create a cross platform test case.
See also bug#190195
Any ideas?
> m_page->settings().setShouldAllowUserInstalledFonts(false);
https://github.com/WebKit/WebKit/blob/edb7dbd59d799e010a5acdcea6a0821df9f14a79/Source/WebCore/svg/graphics/SVGImage.cpp#L489