You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and ./resvg --sans-serif-family "Liberation Sans" simple_subscript_bold.svg simple_subscript_bold.png gives a warning "Warning (in usvg_text_layout:1398): Fallback from Liberation Sans to Noto Sans Mono." and result like
However specifying ./resvg --sans-serif-family "Noto Sans Mono" simple_subscript_bold.svg simple_subscript_bold.png doesn't give any warnings and also doesn't render the text in bold:
I suppose the problem is that Liberation Sans doesn't have the codepoint 2083 (subscript 2) available: fc-query --format='%{charset}\n' /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf ⇒ … 207f 20a3-20a4 … and Noto does (2074-208e). But I would expect then that a regular weight fallback would be used, and preferably a warning why the fallback was used when the requested font does exist.
The text was updated successfully, but these errors were encountered:
Yes, the current font fallback algorithm doesn't account for font styles. It simply picks up the first font that has the required glyph. There is an endless amount of work left in the SVG text layout.
And while this is definitely a bug/missing feature, your SVG is partly to blame, because it literally states "use whatever font you want". Which it does.
Using a file like
and
./resvg --sans-serif-family "Liberation Sans" simple_subscript_bold.svg simple_subscript_bold.png
gives a warning "Warning (in usvg_text_layout:1398): Fallback from Liberation Sans to Noto Sans Mono." and result likeHowever specifying
./resvg --sans-serif-family "Noto Sans Mono" simple_subscript_bold.svg simple_subscript_bold.png
doesn't give any warnings and also doesn't render the text in bold:I suppose the problem is that Liberation Sans doesn't have the codepoint 2083 (subscript 2) available:
fc-query --format='%{charset}\n' /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf
⇒… 207f 20a3-20a4 …
and Noto does (2074-208e
). But I would expect then that a regular weight fallback would be used, and preferably a warning why the fallback was used when the requested font does exist.The text was updated successfully, but these errors were encountered: