Page MenuHomePhabricator

Specific SVG file includes a Greek letter in "Symbol" font (not installed on some systems), so it is rendered as another Latin letter instead
Closed, InvalidPublicBUG REPORT



I imagine this is also due to the fact that this tool was invented when there was no proper working SVG support in most browsers.

Steps to Reproduce:

Compare the the theta symbol here (png generated by me)
Compare with the q symbol here (i.e. the SVG source)

if you download the SVG file it works from Chrome, IE 11 and edge

Actual Results:

SVG tool does not render properly the symbol font and makes a q out of a theta

Expected Results:

As far as there is a workable browser like chrome or edge, png shall not be generated at all but the SVG shall be passed over to the browser, this is more logical faster and the image should scale properly.

I would also expect that somehow automatically when you store:
automatically also pages like
are available like in typical DAM

For short term fix and For non workable browsers you may check if you can install the symbol font (and maybe some other fonts) together with the png generator.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hi @Flyredeagle, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
I assume this is not related to the SVG Translate Tool, as I don't see any versions translated into other human languages of that SVG file involved.

I imagine this is also due to the fact that this tool was invented when there was no proper working SVG support in most browsers.

Which "tool" do you refer to?

For the records, opening (the SVG file itself, not a PNG thumbnail of it) directly in my web browser (Firefox 82), or downloading it and opening it locally in Inkscape, I get Font 'Symbol' substituted with 'Bitstream Vera Sans' and a q instead of a Theta displayed.

It looks like some uncommon font called Symbol was used which is not available on many systems, so many systems fall back to another font which might either lack Greek letters, or the fallback mechanism of mapping characters itself is broken.

Aklapper renamed this task from SVG rendering of Symbol font to Specific SVG file includes a Greek letter in "Symbol" font (not installed on some systems), so it is rendered as another Latin letter instead.Nov 8 2020, 1:39 PM

oh interesting
I read from
that there is a "png rendered" action and I though there must be some
shape of tool also

Size of this PNG preview of this SVG file: 422 × 599 pixels
. Other resolutions: 169 × 240 pixels

338 × 480 pixels

422 × 600 pixels

541 × 768 pixels

721 × 1,024 pixels

524 × 744 pixels
[image: Help about image annotations]

Original file
‎(SVG file, nominally 524 × 744 pixels, file size: 16 KB)

This image rendered as PNG in other widths: 200px
, 500px
, 1000px
, 2000px

I thought that SVG translation tool was the one but is some shape of SVG
rendering component that transform stuff to PNG

can you place the bug to the correct people ?


And the SVG image reference in wikipedia goes as a

[[File:Adiabatic-pendulum.svg |thumb|200px|right|alt=Forced Pendulum|Pendulum with extra small vibration where <math> \omega(t) = \sqrt {g \over L(t)} \approx \sqrt {g \over L_0}</math> and <math>L(t) \approx L_0 + \varepsilon(t)+...</math>]]

and generated as

<h2><span id="Classical_mechanics_.E2.80.93_action_variables"></span><span class="mw-headline" id="Classical_mechanics_–_action_variables">Classical mechanics – action variables</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Adiabatic_invariant&amp;action=edit&amp;section=4" title="Edit section: Classical mechanics – action variables">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Adiabatic-pendulum.svg" class="image"><img alt="Forced Pendulum" src="" decoding="async" width="200" height="284" class="thumbimage" srcset=" 1.5x, // 2x" data-file-width="524" data-file-height="744" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Adiabatic-pendulum.svg" class="internal" title="Enlarge"></a></div>Pendulum with extra small vibration where

Which looks like that the generated PNG is imported not the SVG one but maybe I miss something

And the font is uncommon to the extent of non math stuff but is fairly common for greek letters in math formulas ...
and in my chrome and other browsers the SVG file works fine, maybe because symbol font comes on windows and e.g. not on linux / mac box, but I see still the q in the wikimedia page cause the page is pushing me the PNG (that was generated with a q) not the SVG,
therefore I imagine is an issue of the PNG generation server side not of client side availability of the font.

This is not a PNG thumbnail creation issue. The problem is with the SVG itself and that it uses fonts not available on the Wikimedia servers.

Glrx claimed this task.
Glrx added a subscriber: Glrx.

The issue is the Symbol font does not use Unicode code points. SVG agents look at the file and believe they are rendering a "q". If the agent happens to have the Symbol font, then it tells that font to render a "q"; the font's q just happens to look like a theta. Otherwise, the agent chooses a font with normal code points, and that font will paint a glyph that looks like a "q".

The fix is to specify a Unicode theta character in the SVG file and get rid of the Symbol font specification.

Aklapper changed the task status from Resolved to Invalid.Apr 25 2021, 5:28 PM
Aklapper removed Glrx as the assignee of this task.