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.

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

font("Bitstream Vera", "Sans", "Roman")
#> $ttf
#> [1] "/data/user-homes/elizabethb/projects/prism-pkgdocs-build/installed-pkgs/priority-3/fontquiver_0.2.1_lib/fontBitstreamVera/fonts/bitstream-vera-fonts/Vera.ttf"
#> 
#> $woff
#> [1] "/data/user-homes/elizabethb/projects/prism-pkgdocs-build/installed-pkgs/priority-3/fontquiver_0.2.1_lib/fontBitstreamVera/fonts/bitstream-vera-fonts/Vera.woff"
#> 
#> $fontset
#> [1] "Bitstream Vera"
#> 
#> $name
#> [1] "Bitstream Vera Sans"
#> 
#> $fullname
#> [1] "Bitstream Vera Sans Roman"
#> 
#> $variant
#> [1] "sans"
#> 
#> $style
#> [1] "roman"
#> 
#> $weight
#> [1] 80
#> 
#> $family
#> [1] "sans"
#> 
#> $face
#> [1] "plain"
#> 
#> $package
#> [1] "fontBitstreamVera"
#> 
#> $version
#> [1] "1.10"
#> 
#> attr(,"class")
#> [1] "font"

f <- fonts("Liberation")
str(f, 1)
#> List of 12
#>  $ Sans Regular     :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Sans Italic      :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Sans Bold        :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Sans Bold Italic :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Mono Regular     :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Mono Oblique     :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Mono Bold        :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Mono Bold Italic :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Serif Regular    :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Serif Italic     :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Serif Bold       :List of 12
#>   ..- attr(*, "class")= chr "font"
#>  $ Serif Bold Italic:List of 12
#>   ..- attr(*, "class")= chr "font"

font_symbol("Symbola")
#> $ttf
#> [1] "/tmp/RtmpcCsJoX/temp_libpath2ab8093af903f7/fontquiver/fonts/symbola-fonts/Symbola.ttf"
#> 
#> $woff
#> [1] "/tmp/RtmpcCsJoX/temp_libpath2ab8093af903f7/fontquiver/fonts/symbola-fonts/Symbola.woff"
#> 
#> $fontset
#> [1] "Symbola"
#> 
#> $name
#> [1] "Symbola"
#> 
#> $fullname
#> [1] "Symbola"
#> 
#> $variant
#> [1] "symbols"
#> 
#> $style
#> [1] "regular"
#> 
#> $weight
#> [1] 80
#> 
#> $family
#> [1] "symbol"
#> 
#> $face
#> [1] "symbol"
#> 
#> $package
#> [1] "fontquiver"
#> 
#> $version
#> [1] "9.00"
#> 
#> attr(,"class")
#> [1] "font"