Bug 76162 - Font selection fails when including external SVG
Summary: Font selection fails when including external SVG
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 02:58 PST by pom
Modified: 2015-05-15 13:09 PDT (History)
3 users (show)

See Also:


Attachments
Left is included SVG, right is inline SVG. Font selection fails in included SVG (472 bytes, text/html)
2012-01-12 02:58 PST, pom
no flags Details
The included SVG file (identical to the inline content), works as expected when loaded directly (206 bytes, image/svg+xml)
2012-01-12 02:59 PST, pom
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pom 2012-01-12 02:58:54 PST
Created attachment 122199 [details]
Left is included SVG, right is inline SVG. Font selection fails in included SVG

When including an external SVG file (e.g. with the SVG <image> tag or the HTML <img> tag), font selection fails for the <text> elements with a "font-family" attribute in the included file. Attached are two files: bug_image_font.html is an HTML that shows two SVG images, one included from the file image.svg and the other inline. Both are identical, but in the included case (left), the sans-serif text is rendered with the default, serif font (at least on my machine.) The inline example (or the included SVG file loaded directly) shows the right fonts.
Comment 1 pom 2012-01-12 02:59:40 PST
Created attachment 122200 [details]
The included SVG file (identical to the inline content), works as expected when loaded directly
Comment 2 Alexey Proskuryakov 2012-01-12 10:13:42 PST
See also: bug 68090.
Comment 3 Rob Buis 2012-06-10 13:12:33 PDT
This bug is probably invalid, Opera and FF do not support this either. Furthermore, having svg embedded inline in a html document is the workaround anyway. If I get svg-as-image correctly, it is just another image format.
Comment 4 pierreetienne.meunier 2012-07-05 14:54:42 PDT
Firefox does not support svg fonts. In order to be an image format, "svg-as-image" should not change when embedded in an html page. This is not the case with any other format : a jpeg looks the same when seen alone in a browser, or in an html page.