Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CairoFonts

Set the fonts used for all Cairo graphics devices.


Description

CairoFonts initializes the fonts used for Cairo graphics devices.

Usage

CairoFonts(
	regular="Helvetica:style=Regular",
	bold="Helvetica:style=Bold",
	italic="Helvetica:style=Italic",
	bolditalic="Helvetica:style=Bold Italic,BoldItalic",
	symbol="Symbol"
)

Arguments

regular

character; fontconfig pattern for the 'plain text' font.

bold

character; fontconfig pattern for the 'bold face' font.

italic

character; fontconfig pattern for the 'italic' font.

bolditalic

character; fontconfig pattern for the 'bold italic' font.

symbol

character; fontconfig pattern for the 'symbol' font.

Details

This function sets the fonts for Cairo graphics devices globally; previously opened Cairo graphics devices will also use these fonts. The argument names correspond to the five values of the graphical parameter 'font', i.e. regular is 1, bold is 2, italic is 3, etc.

For an explanation of fontconfig patterns, see CairoFontMatch.

Known issues

  • This function is only available when the cairo graphics library is configured with FreeType and Fontcofig support.

  • R math symbols are supported,but require a "Symbol" font with the Adobe symbol encoding. At the time of this release the authors are unaware of a free version of this font, however they do exist on Windows and Mac OS X.

See Also

Examples

## Not run: 
#
# The following fontconfig patterns define the free truetype fonts 
# available in the debian package 'ttf-freefont'.
# 
# Freesans is very similar to Helvetica
CairoFonts(
	regular="FreeSans:style=Medium",
	bold="FreeSans:style=Bold",
	italic="FreeSans:style=Oblique",
	bolditalic="FreeSans:style=BoldOblique"
)

## End(Not run)

Cairo

R Graphics Device using Cairo Graphics Library for Creating High-Quality Bitmap (PNG, JPEG, TIFF), Vector (PDF, SVG, PostScript) and Display (X11 and Win32) Output

v1.5-12.2
GPL-2
Authors
Simon Urbanek <Simon.Urbanek@r-project.org>, Jeffrey Horner <jeff.horner@vanderbilt.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.