font_feature {systemfonts}R Documentation

Define OpenType font feature settings

Description

This function encapsulates the specification of OpenType font features. Some specific features have named arguments, but all available features can be set by using its specific 4-letter tag For a list of the 4-letter tags available see e.g. the overview on Wikipedia.

Usage

font_feature(ligatures = NULL, letters = NULL, numbers = NULL, ...)

Arguments

ligatures

Settings related to ligatures. One or more types of ligatures to turn on (see details).

letters

Settings related to the appearance of single letters (as opposed to ligatures that substitutes multiple letters). See details for supported values.

numbers

Settings related to the appearance of numbers. See details for supported values.

...

key-value pairs with the key being the 4-letter tag and the value being the setting (usually TRUE to turn it on).

Details

OpenType features are defined by a 4-letter tag along with an integer value. Often that value is a simple 0 (off) or 1 (on), but some features support additional values, e.g. stylistic alternates (salt) where a font may provide multiple variants of a letter and the value will be used to chose which one to use.

Common features related to appearance may be given with a long form name to either the ligatures, letters, or numbers argument to avoid remembering the often arbitrary 4-letter tag. Providing a long form name is the same as setting the tag to 1 and can thus not be used to set tags to other values.

The possible long form names are given below with the tag in parenthesis:

Ligatures

Letters

Numbers

Value

A font_feature object

Examples

font_feature(letters = "stylistic", numbers = c("lining", "tabular"))

# Use the tag directly to access additional stylistic variants
font_feature(numbers = c("lining", "tabular"), salt = 2)


[Package systemfonts version 1.1.0 Index]