Learn R Programming

fontquiver (version 0.2.1)

fonts: Get elements of a fontset

Description

fonts() returns the list of all font objects for a given fontset (a collection of fonts provided by fontquiver, such as Liberation or Bitstream Vera). font() returns one specific font. font_symbol() extracts the font marked as symbol font, if it exists in the fontset.

Usage

fonts(fontset)
font(fontset, variant, style)
font_symbol(fontset = "Symbola")

Arguments

fontset
A string giving the name of a set of fonts (e.g. "Liberation" or"Bitstream Vera"). Use fontset_list() to obtain the list of fontsets registered in your session.
variant
Font variant, as per Fontconfig's nomenclature. Use fontset_variants() to find out which variants are available for a fontset.
style
Font style, as per Fontconfig's nomenclature. Use fontset_styles() to find out which variants are available for a fontset.

Examples

Run this code
font("Bitstream Vera", "Sans", "Roman")

f <- fonts("Liberation")
str(f, 1)

font_symbol("Symbola")

Run the code above in your browser using DataLab