These functions handle the translation of a device-independent R graphics
font family name to a quartz font description.
Usage
quartzFont(family)
quartzFonts(...)
Arguments
family
a character vector containing the four PostScript font
names for plain, bold, italic, and bolditalic versions of
a font family.
...
either character strings naming mappings to display,
or new (named) mappings to define.
Details
A quartz device is created with a default font (see
the documentation for quartz), but it is also possible
to specify a font family when drawing to the device
(for example, see the documentation for gpar in the
grid package).
The font family sent to the device is a simple string name, which must be
mapped to something more specific to quartz fonts. A list of
mappings is maintained and can be modified by the user.
The quartzFonts function can be used to list existing
mappings and to define new mappings. The quartzFont
function can be used to create a new mapping.
Default mappings are provided for three device-independent font family
names: "sans" for a sans-serif font, "serif" for a serif
font and "mono" for a monospaced font.
See Also
quartz
Examples
quartzFonts()
quartzFonts("mono")
## Not run:
## for East Asian locales you can use something like
quartzFonts(sans = quartzFont(rep("AppleGothic", 4)),
serif = quartzFont(rep("AppleMyungjp", 4)))
## since the default fonts may well not have the glyphs needed
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(grDevices)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/grDevices/quartzFonts.Rd_%03d_medium.png", width=480, height=480)
> ### Name: quartzFonts
> ### Title: quartz Fonts
> ### Aliases: quartzFont quartzFonts
> ### Keywords: device
>
> ### ** Examples
>
> quartzFonts()
$serif
[1] "Times-Roman" "Times-Bold" "Times-Italic" "Times-BoldItalic"
$sans
[1] "Helvetica" "Helvetica-Bold" "Helvetica-Oblique"
[4] "Helvetica-BoldOblique"
$mono
[1] "Courier" "Courier-Bold" "Courier-Oblique"
[4] "Courier-BoldOblique"
> quartzFonts("mono")
$mono
[1] "Courier" "Courier-Bold" "Courier-Oblique"
[4] "Courier-BoldOblique"
> ## Not run:
> ##D ## for East Asian locales you can use something like
> ##D quartzFonts(sans = quartzFont(rep("AppleGothic", 4)),
> ##D serif = quartzFont(rep("AppleMyungjp", 4)))
> ##D ## since the default fonts may well not have the glyphs needed
> ## End(Not run)
>
>
>
>
> dev.off()
null device
1
>