font_lcpi | R Documentation |
Calculate lines per inch and characters per inch for font
font_lcpi(
font_family = "Courier",
font_size = 8,
lineheight = 1,
fontspec = font_spec(font_family, font_size, lineheight)
)
font_family |
( |
font_size |
( |
lineheight |
( |
fontspec |
( |
This function opens a PDF graphics device, writes to a temporary file, then
utilizes grid::convertWidth()
and grid::convertHeight()
to calculate lines
per inch and characters per inch for the specified font family, size, and
line height.
An error is thrown if the font is not monospaced (determined by comparing
the effective widths of the M
and .
glyphs).
A named list with cpi
and lpi
, the characters and lines per
inch, respectively.
font_lcpi <- getFromNamespace("font_lcpi", "formatters")
font_lcpi()
font_lcpi(font_size = 8)
font_lcpi(font_size = 8, lineheight = 1.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.