owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Download chart as PNG is showing the wrong font configuration for mobile

Open paarriagadap opened this issue 9 months ago • 2 comments

Description

When downloading a chart as png, the file shows the wrong fonts. This is only happening on mobile.

Expected behaviour

The png file should look like the the desktop download (see screenshots)

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to this URL on mobile.
  2. Click on "Download"
  3. Click on "Image (PNG)"
  4. Open the downloaded picture.
  5. Do the same in desktop and compare both files.

Screenshots

This is how it looks in mobile: share-of-population-in-extreme-poverty (9)

This is how it should look (desktop download): share-of-population-in-extreme-poverty (7)

Environment

For desktop, provide:

  • OS: macOS Sonoma 14.4.1
  • Browser: Chrome
  • Version: 124.0.6367.119 (Official Build) (arm64)

For smartphone, instead provide:

  • Device: Google Pixel 7a
  • OS: Android 14
  • Browser: Chrome
  • Version: 124.0.6367.113

Additional context

  • I don't see the issue for SVG exports.
  • Related: https://github.com/owid/owid-grapher/issues/3210

paarriagadap avatar May 03 '24 09:05 paarriagadap

To discuss with @marcelgerber in the next issue triage: we probably don't want to invest time in fixing this in some mobile phone cases - but we could consider moving this code from the client to always use our CF workers. TBD

danyx23 avatar May 22 '24 14:05 danyx23

Sadly, there's an issue where for some memory-intensive charts, the CF workers will fail with OOM (see #3723) and a thumbnail can thus not be generated.

This makes it so that I'm still a bit hesitant to use dynamic thumbnails in this place.

marcelgerber avatar Jun 19 '24 13:06 marcelgerber