Skip to content

Base R png() hangs when pango is loaded from a package #613

Description

@jeroen

I thought that we used this before but I see the same problem with older versions of webR:

install.packages("magick")
library(magick)
png('test.png')
plot(rnorm(100), main = 'bla')
dev.off()

The R console shows a warning

(process:42): Pango-WARNING **: 13:17:04.095: shaping failure, expect ugly output. shape-engine='PangoFcShapeEngine', font='Noto Sans 9', text='m'

And browser dev console shows a "remainer by zero" error:

Image

For some reason it does not happen when using alternative png devices:

install.packages("magick")
install.packages("ragg")
library(magick)
library(ragg)
ragg::agg_png('test.png')
plot(rnorm(100), main = 'bla')
dev.off()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions