str_metrics: Get font metrics for a string.

View source: R/str-metrics.R

str_metricsR 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, italic

Is text bold/italic?

fontfile

Font file

Value

A named numeric vector

Examples

str_metrics("Hello World!")

davidgohel/gdtools documentation built on March 18, 2024, 3:57 p.m.