Skip to content

Commit

Permalink
better test for glyph
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 16, 2025
1 parent 03b7c8c commit d265662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/font_outline.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ glyph_raster <- function(glyph, path, index = 0, size = 12, res = 300, col = "bl
#' grid::grid.draw(grob)
#'
glyph_raster_grob <- function(glyph, x, y, ..., default.units = "bigpts") {
if (is.null(glyph)) return(grid::nullGrob())
if (length(glyph) == 0) return(grid::nullGrob())
if (!grid::is.unit(x)) x <- grid::unit(x, default.units)
if (!grid::is.unit(y)) y <- grid::unit(y, default.units)
size <- attr(glyph, "size")
Expand Down

0 comments on commit d265662

Please sign in to comment.