owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.38k stars 229 forks source link

Use correct Semibold font weight in static chart titles #3210

Closed samizdatco closed 7 months ago

samizdatco commented 8 months ago

Description

The design calls for chart titles to be set in Playfair Semibold (weight 600), but the PNG-generation code does not preload that weight and was not properly rendering exports when the style was updated. As a stopgap, the title weight was reverted to 500.

The actual fix would involve:

There's also the issue of creating fresh exports after making these changes since currently the baking process only generates new ones if the config has changed since the previous bake.

To get around this, try:

  1. hard-coding the chartIsSameVersion function in GrapherBaker.ts to return false
  2. triggering a bake
  3. restoring the normal lazy behavior of chartIsSameVersion

Slack discussions

sophiamersmann commented 8 months ago

@samizdatco Running make && make install errors out for me and gives the following error:

unzip -jo .env/build/lato.zip -d .env/build/lato '*/*/*/Lato-*.woff2' && touch .env/build/lato/*
Archive:  .env/build/lato.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of .env/build/lato.zip or
        .env/build/lato.zip.zip, and cannot find .env/build/lato.zip.ZIP, period.
make[1]: *** [.env/build/lato] Error 9

When I look at .env/build/lato.zip, it contains a plain text HTML file (uncompressed). Is it possible we're accidentally unzipping twice?