GithubHelp home page GithubHelp logo

pkgdown site fonts broken about cmapplot HOT 9 CLOSED

cmap-repos avatar cmap-repos commented on May 27, 2024
pkgdown site fonts broken

from cmapplot.

Comments (9)

nmpeterson avatar nmpeterson commented on May 27, 2024 1

I'll try to take a closer look tomorrow but I'm not confident I'll be able to find the problem. According to the logs from the most recent pkgdown build, the fonts were correctly installed and available to R on the virtual machine.

image

from cmapplot.

nmpeterson avatar nmpeterson commented on May 27, 2024 1

We don’t use systemfonts, we use sysfonts

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

Interestingly enough, it also looks like text is not getting bolded (e.g. title text in finalize), which should be happening even if falling back to Arial.

This could definitely be our fault, but I can't help but wonder if this has to do with the updates to the systemfonts package?

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

for me, fonts work:

  • when using cmapplot on my computer
  • when knitting the finalize.Rmd vignette on my computer

Fonts do not work:

  • when previewing the pkgdown site locally using pkgdown::build_site()
  • when the pkgdown site is built by the github VM

Could this be a pkgdown issue?

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

pkgdown was updated last Fall to use ragg_png to export png files. I wonder if the 2021 upgrades to ragg have created a pkgdown-specific knitting issue?

from cmapplot.

nmpeterson avatar nmpeterson commented on May 27, 2024

Can confirm that pkgdown::build_site() is not working locally for me, either. If I install cmapplot with devtools::install_github('cmap-repos/cmapplot', build_vignettes=T) and then browseVignettes('cmapplot'), everything appears correct.

This is psychotic.

from cmapplot.

nmpeterson avatar nmpeterson commented on May 27, 2024

Unfortunately I don't think I'm going to have any more time to investigate further this week.

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

It looks to me that a backend change in pkgdown has caused this issue. Rolling back to a previous version of pkgdown and previewing the site locally shows fonts correctly:

install_version("pkgdown", version = "1.5.1", repos = "http://cran.us.r-project.org")
pkgdown::build_site()

pkgdown has been at version 1.6.0 for months, during which time the site has built correctly. However, 1.6.0 was updated to use ragg_png, and ragg has been updated with substantial changes much more recently.

We don't call ragg_png directly, but pkgdown will use it behind the scenes to convert our "in-vignette plotting" to pngs for the html output. I presume that the regular knitting performed by rstudio does not use ragg, which would be why the error does not exist when vignettes are built normally.

We could solve this by trying to figure out what exactly what went wrong within the pkgdown context, but I think the right thing to do here is to actually to take the plunge and upgrade finalize_plot() to use ragg_png etc. My guess is this will recreate the same problem locally, which we would then need to solve but should address all cases. This is re-opening a big can of worms, though.

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

Replaced this with #127

from cmapplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.