str_metrics: Get font metrics for a string.
Description
Get font metrics for a string.
Usage
str_metrics(x, fontname = "sans", fontsize = 12, bold = FALSE, italic = FALSE, fontfile = "")
Arguments
x
Character vector of of strings to measure
italic
Is text bold/italic?
Value
A named numeric vector
Examples
Run this code
# The first run can be slow when font caches are missing
# as font files are then being scanned to build those font caches.
str_metrics("Hello World!")
Run the code above in your browser using DataLab