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

Description

see https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.png

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)
https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.png
Compare with the q symbol here (i.e. the SVG source)
https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.svg

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:
https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.svg
automatically also pages like
https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.png
https://commons.wikimedia.org/wiki/File_talk:Adiabatic-pendulum.jpg
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 https://upload.wikimedia.org/wikipedia/commons/7/75/Adiabatic-pendulum.svg (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 https://commons.wikimedia.org/wiki/File:Adiabatic-pendulum.svg
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
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/422px-Adiabatic-pendulum.svg.png
. Other resolutions: 169 × 240 pixels
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/169px-Adiabatic-pendulum.svg.png

338 × 480 pixels

https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/338px-Adiabatic-pendulum.svg.png

422 × 600 pixels

https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/422px-Adiabatic-pendulum.svg.png

541 × 768 pixels

https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/541px-Adiabatic-pendulum.svg.png

721 × 1,024 pixels

https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/721px-Adiabatic-pendulum.svg.png

524 × 744 pixels

https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/524px-Adiabatic-pendulum.svg.png
.
[image: Help about image annotations]
https://commons.wikimedia.org/wiki/Help:Gadget-ImageAnnotator

Original file
https://upload.wikimedia.org/wikipedia/commons/7/75/Adiabatic-pendulum.svg
‎(SVG file, nominally 524 × 744 pixels, file size: 16 KB)

This image rendered as PNG in other widths: 200px
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/200px-Adiabatic-pendulum.svg.png
, 500px
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/500px-Adiabatic-pendulum.svg.png
, 1000px
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/1000px-Adiabatic-pendulum.svg.png
, 2000px
https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/2000px-Adiabatic-pendulum.svg.png
.

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 ?

Thanks
Diego

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="upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/200px-Adiabatic-pendulum.svg.png" decoding="async" width="200" height="284" class="thumbimage" srcset="upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/300px-Adiabatic-pendulum.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/75/Adiabatic-pendulum.svg/400px-Adiabatic-pendulum.svg.png 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 subscribed.

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.