open_font_dev | R Documentation |
Activate font state
open_font_dev(fontspec, silent = FALSE)
close_font_dev()
debug_font_dev()
undebug_font_dev()
fontspec |
( |
silent |
( |
The font device state is an environment with four variables guaranteed to be set:
open
(logical(1)
)
whether a device is already open with font info
fontspec
(font_spec
)
the font specification, if any, that is currently active (list()
if none is).
spacewidth
(numeric(1)
)
the width of the space character in the currently active font.
ismonospace
(logical(1)
)
whether the specified font is monospaced.
open_font_dev
opens a pdf device with the specified font
only if there is not one currently open with the same font.
If a new device is opened, it caches spacewidth
and
ismonospace
for use in nchar_ttype
).
close_font_dev
closes any open font state device
and clears the cached values.
debug_font_dev
and undebug_font_dev
activate and deactivate, respectively,
logging of where in the call stack font devices are being opened.
open_font_dev
returns a logical value indicating whether a new pdf device was opened.
close_font_dev
, debug_font_dev
and undebug_font_dev
return NULL
.
In all cases the value is returned invisibly.
open_font_dev(font_spec("Times"))
nchar_ttype("Hiya there", font_spec("Times"))
close_font_dev()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.