backNotesGrob(), creditsGrob(), spineIconGrob(), and
spineTextGrob() are helper grob functions to help make small
box game jackets using pnpmisc::pdf_create_jacket().
Usage
spineTextGrob(title, col = "white", size = c("4x6", "poker", "wallet"))
creditsGrob(
xmp = xmpdf::xmp(),
credits = character(),
icons = FALSE,
size = c("4x6", "poker", "wallet"),
...,
width = NULL,
x = NULL,
cex = 1
)
backNotesGrob(
notes,
col = "black",
size = c("4x6", "poker", "wallet"),
...,
style = sbgjackets_style(size, color = col)
)
spineIconGrob(
players,
minutes,
weight,
col = "white",
size = c("4x6", "poker", "wallet")
)Arguments
- title
Title of small box game jacket (usually game name)
- col
Color of text/icons
- size
Target box size. Either
"4x6","poker", or"wallet".- xmp
A
xmpdf::xmp()object with copyright/license information.- credits
A character vector of (commonmark) credits to eventually be passed to
marquee::marquee_grob(). Will be collapsed to a single string bypaste(collapse = "\n"), leading/trailing whitespace will be trimmed, any tab indentations will be unindented, and will be processed bymarquee::marquee_glue().- icons
If
TRUEinclude Creative Commons credits for Games-icons.net icons.- ...
Ignored for now.
- x, width
grid::unit()that will be passed tomarquee::marquee_grob().- cex
Multiplier applied to the font size (and hence the line spacing) which can be lowered to compact longer credits.
- notes
A character vector of (commonmark) back cover notes. Will be collapsed to a single string by
paste(collapse = "\n"), leading/trailing whitespace will be trimmed, any tab indentations will be unindented, and will be processed bymarquee::marquee_glue().- style
A
marqueestyle set object (e.g. fromsbgjackets_style()).- players
A integer vector of allowed number of players
- minutes
An integer of number of minutes (larger number from BGG)
- weight
A double of game weight (number from BGG)
Examples
library("grid", include.only = c("gList", "gpar"))
sbgj_example <- function(output = NULL) {
front <- fullGrob("#D55E00")
back <- fullGrob("#009E73")
spine <- gList(fullGrob("black"),
spineTextGrob("Example Spine"),
spineIconGrob(2:4, 30, 1.5))
inner <- creditsGrob(icons = TRUE)
pnpmisc::pdf_create_jacket(output, front = front, back = back,
spine = spine, inner = inner)
}