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
For some reason the static image rendering is using the wrong font. E.g.
when it should look like:
The font is in /home/vagrant/.fonts/PTN57.ttf and my understanding was that any font here would be used by the SVG renderer (we use cairosvg) automatically. This might be where the bug is happening. Could help to just test the prerendered_html_to_image function by itself on an SVG file generated by the atlas. It used to work okay but stopped working at some point - I'm not sure if this was because I changed some code.
It looks like cairosvg supports a very few fonts and with no support for svg fonts. Also the font element is ignored completely. Here's the documentation http://cairosvg.org/svg_support/#idid10
In order to support (Helvetica Neue) or (PT Sans Narrow) which I can see is being used in viz_general.js, either we can explore other svg2png rendering engine, or we can change the fonts to CSS2 font face which will be supported by cairosvg natively.
For some reason the static image rendering is using the wrong font. E.g.
when it should look like:
The font is in /home/vagrant/.fonts/PTN57.ttf and my understanding was that any font here would be used by the SVG renderer (we use cairosvg) automatically. This might be where the bug is happening. Could help to just test the prerendered_html_to_image function by itself on an SVG file generated by the atlas. It used to work okay but stopped working at some point - I'm not sure if this was because I changed some code.
The static image stuff runs in a celery task in the background (http://www.celeryproject.org/) and you can find the code in https://github.com/cid-harvard/atlas-economic-complexity/blob/beta/django_files/atlas/celery_tasks.py You can check if the automatic celery task is running by typing
sudo supervisorctl status celery
. It might help to kill that process and run your own one manually to see debug information.Let me know if you need help understanding how the static image code works or if you need help running it.
The text was updated successfully, but these errors were encountered: