Skip to content

agg_png renders plotmath %*% as centered dot (·) instead of multiplication sign (×) #213

@davidzgli

Description

@davidzgli

Description

ragg::agg_png renders the plotmath %*% operator as a centered dot (· U+00B7) instead of the multiplication sign (× U+00D7). grDevices::png renders it correctly as ×.

Expected: expression(italic(P) == 2.36 %*% 10^-05) renders with × (multiplication sign)
Actual: The same expression renders with · (middle dot / centered dot) when using agg_png

Minimal reprex

library(ragg)

expr <- expression(italic(P) == 2.36 %*% 10^-05)

# ragg: %*% renders as centered dot (·)
agg_png("reprex_ragg.png", width = 400, height = 150, res = 150)
par(mar = c(1, 1, 2, 1))
plot.new()
title(main = "ragg::agg_png")
text(0.5, 0.5, expr, cex = 1.5)
dev.off()

# grDevices: %*% renders correctly as multiplication sign (×)
grDevices::png("reprex_grdevices.png", width = 400, height = 150, res = 150)
par(mar = c(1, 1, 2, 1))
plot.new()
title(main = "grDevices::png")
text(0.5, 0.5, expr, cex = 1.5)
dev.off()

Compare reprex_ragg.png (shows ·) with reprex_grdevices.png (shows ×).

Session info

  • R 4.5.2 (2025-10-31)
  • Platform: x86_64-pc-linux-gnu (Linux)
  • ragg 1.5.0

Related issues

This may be related to other symbol/font rendering issues:

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