Page MenuHomePhabricator

librsvg misinterpret quoted font family names that contain whitespaces
Closed, ResolvedPublic


File:Meta SVG fonts.svg

When specifying a font family with whitespaces it is recommended to escaping this in quotes, but the SVG rendering engine couldn't interpret this.

(Here the attached file source without quotes [[:file:Meta_SVG_fonts.svg]], one with CSS and one with SVG own property)

Reopened (2017-05-20) as the upstream fix included in librsvg 2.40.10. was only for the CSS property.

Version: unspecified
Severity: normal
See Also:
T25643: Allow alternative declaration of SVG fonts (font-family="'FontName-Bold'" in addition to: font-family="Font name" font-weight="bold")


CSS property fixed
SVG attribute not fixed



Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:56 AM
bzimport set Reference to bz62987.
bzimport added a subscriber: Unknown Object (MLST).
Menner set Security to None.
Aklapper subscribed.

Fixed in upstream librsvg; patch will be included in librsvg 2.40.10.

Aklapper changed the task status from Open to Stalled.Aug 9 2015, 3:53 PM

Fix included in version 2.40.10 which got released now. Now need to backport or need to wait for the distribution used on Wikimedia servers to provide that version....

That bug is fixed on the new jessie image scaler using 2.4.16 (tested locally, it's not yet pooled into the set of active scalers in production).
I have scaled 20140308165757_Test.svg on the new and the present image scalers and put the results at :

whitespace-new.png : Result with new librsvg
whitespace-old.png : Result with old librsvg

The image scalers are now using 2.40.16 containing th upstream fix.

Anyway the disfunction is still present if not CSS but on SVG attribute font-family.

@Perhelion: Does that mean should be reopened? If not, would you please file a separate task?

@Perhelion: Does that mean should be reopened? If not, would you please file a separate task?

@Aklapper: Yes the bug upstream should be reopened, I commented there.

Merged from T184369

If you use (quote and double-quote)

font-family="'font name'"

instead of

font-family="font name"


font-family='font name'

Wiki-Parser don't notice the correct font.
By default Inkscape adds ' ' if the font name has a space like in "Liberation Serif" or "DejaVu Sans" like style="font-family:'Bitstream Charter'"
Scour changes it to: font-family="'Bitstream Charter'" which doesn't help.

T184369.svg (filelink)
Rendered by Wiki-Parser:

T184369.svg.png (210×1 px, 51 KB)

Converted by Inkscape:
MediaWiki_SVG_font_list_serif.png (210×1 px, 109 KB)


@Aklapper : I merged it here, because this was the first time reported, but I think T184369 pointed it out more clearly, was easier to understand, faster to see, included a rendered example,... Should descriptions be updated, if they can be improved? (I think in bugreports it is unimportant who repots it, it is important that you can see the problem in few seconds and the description should be understandable by laypersons on Commons. Since I did here too many mistakes the last days, would you do that for me or/and explain?

Gnome closed issue 319 on 23 August 2018 with commit

So bug is presumably fixed in Rust-version of librsvg but MW blocked on installing Rust version.

JoKalliauer changed the task status from Open to Stalled.Jun 30 2021, 3:04 PM
JoKalliauer moved this task from Backlog to update librsvg on the Wikimedia-SVG-rendering board.
JoKalliauer claimed this task.

it seems to be fixed