preview_variant: Preview numbers, kerning, and ligatures from font variants...

Description Usage Arguments Value Examples

View source: R/preview-variant.R

Description

Use this function to preview the special features of fonts you create including how well the default kerning ruls work, how tabular numbers behave, and whether or not modern, fun ligatures are supported. Change the test_label if you wish to use a custom preview string.

Usage

1
2
3
4
5
6
preview_variant(
  font_variant,
  font_size = 5,
 
    test_label = "Lorem Ipsum dolor sit amet consectetur. => A⃝\n−0+1:2~3,456789\n−9+8:7~6,543210"
)

Arguments

font_variant

a font variant object created with reconfigure_font()

font_size

passed to ggplot2::geom_text()

test_label

a specially designed preview string to showcase some specific font features

Value

A ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
reconfigure_font(
  family = "Trattatello",
  width = "normal",
  ligatures = "discretionary",
  calt = 1, tnum = 1, case = 1,
  dlig = 1, kern = 1,
  zero = 0, salt = 0
) -> trat

preview_variant(trat)

reconfigure_font(
  family = "Barlow",
  width = "normal",
  ligatures = "standard",
  tnum = 1, kern = 1
) -> barlow

preview_variant(barlow)

hrbrmstr/hrbragg documentation built on Feb. 3, 2022, 1:39 a.m.