Determines the width and height of a bounding box that's big enough to (just) enclose the provided text.
str_extents(x, fontname = "sans", fontsize = 12, bold = FALSE, italic = FALSE, fontfile = "")
Character vector of strings to measure
Font name
Font size
Is text bold/italic?
Font file
# NOT RUN { str_extents(letters) str_extents("Hello World!", bold = TRUE, italic = FALSE, fontname = "sans", fontsize = 12) # }
Run the code above in your browser using DataCamp Workspace