Skip to content

On Linux the hat from expression(hat(...)) is put in the wrong location #201

@remlapmot

Description

@remlapmot

I noticed this is happening on the GitHub actions pkgdown.yaml workflows running on ubuntu-latest (and I have reproduced this on a local install of Ubuntu 24.04).

You can see on this plot using agg_png() the hats are put in the wrong place.

library(ragg)
agg_png("ragg-plot.png")
par(mar = c(5, 5, 5, 5), cex.lab = 1.3)
plot(1:10, ylab = expression(hat(beta)), xlab = expression(hat(beta)))
title("Plot saved with ragg_png()")
dev.off()
Image

Whereas using png() they are above the betas as expected.

png("png-plot.png")
par(mar = c(5, 5, 5, 5), cex.lab = 1.3)
plot(1:10, ylab = expression(hat(beta)), xlab = expression(hat(beta)))
title("Plot saved with png()")
dev.off()
Image

Note this doesn't occur on either macOS nor Windows 11.

Tested using ragg version 1.4.0.

Maybe related to #89

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