cairoSymbolFont | R Documentation |
Specify a symbol font for a Cairo-based graphics device. This function provides the opportunity to specify whether the font supports Private Use Area code points.
cairoSymbolFont(family, usePUA = TRUE)
family |
A character vector giving the symbol font family name. |
usePUA |
Does the font support Private Use Area code points? |
On Cairo-based graphics devices, when drawing with a symbol font (e.g., plotmath), Adobe Symbol Encoding characters are converted to UTF-8 code points. This conversion can use Private Use Area code points or not. It is useful to be able to specify this option because some fonts (e.g., the OpenSymbol font that is included in LibreOffice) have glyphs mapped to the Private Use Area and some fonts (e.g., Nimbus Sans L, the URW Fonts equivalent of Helvetica) do not.
An object of class "CairoSymbolFont"
.
cairo_pdf
.
## Not run: ## If a font uses PUA, we can just specify the font name ... cairo_pdf(symbolfamily="OpenSymbol") dev.off() ## ... or equivalently ... cairo_pdf(symbolfamily=cairoSymbolFont("OpenSymbol")) dev.off() ## If a font does not use PUA, we must indicate that ... cairo_pdf(symbolfamily=cairoSymbolFont("Nimbus Sans", usePUA=FALSE)) dev.off() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.