The extrafont
package collects information on
installed fonts from the system. When you first
install extrafont, or after new fonts have been installed on your
system, run extrafont::font_import()
to build
its database of system fonts.
Fonts can be installed in rgl using
rglExtrafonts(rglname = familyname)
or rglExtrafonts(familyname)
. In this call
familyname
is a vector of family names to look
for in the extrafont database using extrafont::choose_font(familyname)
; the first one found
will be registered with rgl. The optional name rglname
will also be usable to refer to the font family.
If none of the given family names is found, no change
will be made to the registered fonts in rgl.
During startup, rgl detects whether extrafont
is installed, and if so runs
rglExtrafonts(sans = c("Helvetica", "Arial"),
serif = c("Times", "Times New Roman"),
mono = c("Courier", "Courier New"))
to attempt to set up the default fonts.
Fonts found by extrafont can also be used in
some other graphics devices besides rgl; see
the extrafont documentation
for details.