R: Get font metrics for a string.

str_metrics {gdtools} | R Documentation

## 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 strings to measure
`fontname` | Font name
`fontsize` | Font size
`bold` | Is text bold/italic?
`italic` | Is text bold/italic?
`fontfile` | Font file

### Value

A named numeric vector

### Examples

    # 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!")

[Package gdtools version 0.1.6 Index]