Bug 20846

Summary: Initial and generic font families are undefined for SVGs used as images
Product: WebKit Reporter: mitz
Component: ImagesAssignee: 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
Reported 2008-09-14 19:14:56 PDT
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
mitz
Comment 1 2008-09-14 19:16:45 PDT
This bug became apparent after <http://trac.webkit.org/changeset/36382>.
mitz
Comment 2 2011-12-14 14:18:16 PST
See also bug 68090.
Fujii Hironori
Comment 3 2024-12-16 00:07:09 PST
EWS
Comment 4 2024-12-16 11:48:11 PST
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
Comment 5 2024-12-16 11:49:17 PST
mitz
Comment 6 2025-09-12 09:39:54 PDT
No way to add a regression test for this?
Fujii Hironori
Comment 7 2025-09-12 18:03:50 PDT
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
Comment 8 2025-09-12 19:05:11 PDT
Fujii Hironori
Comment 9 2025-09-20 03:49:07 PDT
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
Note You need to log in before you can comment on or make changes to this bug.