GNOME Bugzilla – Bug 739329
Unable to load font when font-family is enclosed in single quotation marks
Last modified: 2017-12-13 18:04:46 UTC
Trying to render an SVG file which contains elements like this: <text style="font-family:'Arial';">Foo Bar</text> results in warnings from Pango: couldn't load font "'Arial' Not-Rotated 16", falling back to "Sans Not-Rotated 16", expect ugly output. Removing the single quotation marks around 'Arial' fixes the problem, but these are not only allowed but recommended when the font family name contains spaces. I can't know if this is actually a problem of rsvg, pango, croco (which does the css parsing if I'm correct) or somewhere in between. I'm using the windows binaries which are offered here http://sourceforge.net/projects/ezwinports/files/ That is: librsvg 2.40.1 pango 1.36.1 cairo 1.12.16 pixman 0.32.4 libcroco 0.6.8 gdk-pixbuf 2.30.2 glib 2.38.2 libffi 3.0.13 lzo 2.06
Forgot to mention: I'm using Windows 8.1 Pro x64
Another description downstream: https://phabricator.wikimedia.org/T64987
Created attachment 303418 [details] [review] This patch partly fixes Gnome Bugzilla bug #739329 where quoted font-family styles are omitted and not correclty parsed.
Thanks for fixing this! I've pushed your patch as commit 9c718ff7ac9a3f1aa37d847584a07b13ed1769f0. This will be in librsvg-2.40.10.
This fix works only for CSS not for SVG attribute font-family="'Times New Roman'"! Is this intended?
For the SVG 1.1 specification the font property is the normative definition of the property in CSS2: https://www.w3.org/TR/SVG/text.html#FontFamilyProperty So this is not fixed.
I'm reopening as per last comment.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/95.