font_options: Specify font options for a local font file

Description Usage Arguments Examples

View source: R/cosmofont.r

Description

Only font files of type .ttf, .eot, and .woff are compatible with this package.

Usage

1
2
font_options(path, font_name = NULL, bold = FALSE, italic = FALSE,
  weight = 400)

Arguments

path

The path to the font file.

font_name

The name of the font as it will appear in the stylesheet. If NULL the name of the file will be used. The default value is NULL.

bold

If TRUE the font-weight will be set to 700. The default value is FALSE.

italic

If TRUE the font-style will be set to italic. The default value is FALSE.

weight

The numeric weight of the font. The default value is 400. Setting this value will override the value of bold.

Examples

1
2
3
4
5
6
## Not run: 

verdana <- font_options("~/Desktop/verdana.ttf", weight=800)
monaco <- font_options("~/Desktop/monaco-black.woff", font_name="Monaco")

## End(Not run)

seankross/cosmofont documentation built on May 29, 2019, 4:55 p.m.