Package 'sbgjackets'

Title: Utilities for Small Box Game Jackets
Description: Utilities for small box game jackets.
Authors: Trevor L. Davis [aut, cre] (ORCID: <https://orcid.org/0000-0001-6341-4639>), Delapouite <https://delapouite.com/> [ill] ("Person icon" <https://game-icons.net/1x1/delapouite/person.html> and "Weight icon" <https://game-icons.net/1x1/delapouite/weight.html> / "CC BY 3.0" <https://creativecommons.org/licenses/by/3.0/>), Lorc <https://lorcblog.blogspot.com/> [ill] ("Clockwork icon" <https://game-icons.net/1x1/lorc/clockwork.html> / "CC BY 3.0" <https://creativecommons.org/licenses/by/3.0/>)
Maintainer: Trevor L. Davis <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0-36
Built: 2026-05-21 21:00:06 UTC
Source: https://github.com/trevorld/sbgjackets

Help Index


Check sbgjackets run-time system dependencies

Description

check_sbgjackets_dependencies() checks this sbgjackets run-time system dependencies.

Usage

check_sbgjackets_dependencies()

Details

sbgjackets has the following run-time system dependencies:

  1. The Carlito font.

  2. R compiled with support for the Cairo-devices i.e. cairo_pdf().

  3. System tools to embed various pdf metadata such as exiftool, gs, and/or pdftk.


Create playing card box jacket for various playing card decks.

Description

pcbj_bavarian_pattern() creates a playing card box jacket for a German-suited deck in the Bavarian pattern. pcbj_castilian_pattern() creates a playing card box jacket for a Spanish-suited deck in the Castilian pattern. pcbj_english_pattern() creates a playing card box jacket for a French-suited deck in the English pattern.

Usage

pcbj_bavarian_pattern(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

pcbj_castilian_pattern(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

pcbj_english_pattern(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for traditional card games

Description

pcbj_bridge() creates a playing card box jacket for a Bridge deck. pcbj_pinochle() creates a playing card box jacket for a Pinochle deck. pcbj_poker() creates a playing card box jacket for a Poker deck.

Usage

pcbj_bridge(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

pcbj_pinochle(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

pcbj_poker(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jackets for generic component storage.

Description

pcbj_cubes() creates a playing card box jacket for wooden cube storage. pcbj_dice() creates a playing card box jacket for dice storage. pcbj_meeples() creates a playing card box jacket for meeple storage. pcbj_polyhedral_dice() creates a playing card box jacket for polyhedral dice storage.

Usage

pcbj_cubes(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

pcbj_dice(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

pcbj_meeples(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

pcbj_polyhedral_dice(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for the Decktet

Description

pcbj_decktet() creates a playing card box jacket for the Decktet.

Usage

pcbj_decktet(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for the Everdeck

Description

pcbj_everdeck() creates two playing card box jackets for the Everdeck.

Usage

pcbj_everdeck(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for The Fox in the Forest

Description

pcbj_fox_in_the_forest() creates a playing card box jacket for the game The Fox in the Forest.

Usage

pcbj_fox_in_the_forest(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Details

Note that these print-and-play playing card box jackets are for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for Mahjong

Description

pcbj_mahjong() creates two playing card box jackets for a deck of Mahjong cards.

Usage

pcbj_mahjong(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for Qwixx

Description

pcbj_qwixx() creates a playing card box jacket for the game Qwixx.

Usage

pcbj_qwixx(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Details

Note that these print-and-play playing card box jackets are for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create playing card box jacket for Wizard

Description

pcbj_wizard() creates a playing card box jacket for the game Wizard.

Usage

pcbj_wizard(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  double = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

double

If TRUE produce two jackets instead of one jacket.

Details

Note that these print-and-play playing card box jackets are for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Polish a jacket pdf with instructions and/or metadata

Description

pdf_polish_jacket() polishes a jacket pdf by adding instructions and/or metadata.

Usage

pdf_polish_jacket(output, ..., instructions = FALSE, xmp = NULL)

Arguments

output

Filename of a pdf file created by pnpmisc::pdf_create_jacket() or pnpmisc::pdf_create_poker_jacket().

...

Should be empty.

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

xmp

A xmpdf::xmp() object.

Value

The output filename invisibly


Create SBG Jackets for Generic Component Storage

Description

sbgj_black_stones() creates a small box game jacket for black stones. sbgj_cubes() creates a small box game jacket for wooden cubes. sbgj_glass_stones() creates a small box game jacket for glass stones. sbgj_marbles() creates a small box game jacket for marbles. sbgj_meeples() creates a small box game jacket for meeples. sbgj_pawns() creates a small box game jacket for pawns. sbgj_polyhedral_dice() creates a small box game jacket for polyhedral dice. sbgj_reversible_discs() creates a small box game jacket for reversible discs. sbgj_white_stones() creates a small box game jacket for white stones.

Usage

sbgj_black_stones(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_cubes(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_dice(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_marbles(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_glass_stones(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_meeples(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_pawns(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_polyhedral_dice(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_reversible_discs(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_white_stones(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for Dominoes

Description

sbgj_dominoes_double6(), sbgj_dominoes_double9(), and sbgj_dominoes_double12() creates a small box game jacket for Double-Six Dominoes, Double-Nine Dominoes, and Double-Twelve Dominoes. sbgj_dominoes_all() creates all of those into a single pdf file.

Usage

sbgj_dominoes_all(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = TRUE
)

sbgj_dominoes_double6(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_dominoes_double9(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_dominoes_double12(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for Dungeon Delver

Description

sbgj_dungeon_delver() creates a small box game jacket for Dungeon Delver.

Usage

sbgj_dungeon_delver(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Details

Note that this print-and-play small box game jacket is for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for Looney Pyramids

Description

sbgj_looney_pyramids() creates a small box game jacket for Looney Pyramids. sbgj_homeworlds() creates a small box game jacket for Homeworlds. sbgj_ice_duo() creates a small box game jacket for Ice Duo. sbgj_jinxx() creates a small box game jacket for Jinxx. sbgj_martian_chess() creates a small box game jacket for Martian Chess. sbgj_nomids() creates a small box game jacket for Nomids.

Usage

sbgj_looney_pyramids(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_homeworlds(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_ice_duo(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_jinxx(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_martian_chess(
  output = NULL,
  ...,
  silver = FALSE,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_nomids(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE,
  custom = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be left empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

silver

If TRUE make jacket for silver Martian Chess.

custom

If TRUE use custom back imagery.

Details

Note that these print-and-play small box game jackets are for Personal Use Only. These jackets use images by Looney Labs. These jackets are not for distribution. For more information see the Looney Labs FAQ: https://faq.looneylabs.com/non-gameplay-questions/working-with-looney-labs#1774.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for nestorgames products

Description

sbgj_nestortiles() creates a small box game jacket for Nestortiles. sbgj_shibumi() creates a small box game jacket for Shibumi.

Usage

sbgj_nestortiles(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

sbgj_shibumi(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Details

Note that these print-and-play small box game jackets are for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for Spirograph

Description

sbgj_spirograph() creates a small box game jacket for Spirograph.

Usage

sbgj_spirograph(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Details

Note that this print-and-play small box game jacket is for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for YINSH

Description

sbgj_yinsh() creates a small box game jacket for YINSH.

Usage

sbgj_yinsh(
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  instructions = FALSE
)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be empty.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

instructions

If TRUE then prepend instructions on how to make the jacket to the beginning of the pdf

Details

Note that these print-and-play small box game jackets are for Personal Use Only.

Value

The output file name invisibly. As a side effect creates a pdf file.


Small Box Game Jackets marquee style

Description

sbgjackets_style() returns a marquee style set object to help add text to jackets in a consistent style.

Usage

sbgjackets_style(size = c("4x6", "poker"), ..., color = "black")

Arguments

size

Either "4x6" for a 4x6 photo storage box jacket or "poker" for a playing card storage box.

...

Ignored

color

The desired text color.

Value

A marquee style set object.


Small Box Game Jacket Grobs

Description

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"))

creditsGrob(
  xmp = xmpdf::xmp(),
  credits = character(),
  icons = FALSE,
  size = "4x6",
  ...,
  width = NULL,
  x = NULL
)

backNotesGrob(
  notes,
  col = "black",
  size = c("4x6", "poker"),
  ...,
  style = sbgjackets_style(size, color = col)
)

spineIconGrob(players, minutes, weight, col = "white", size = "4x6")

Arguments

title

Title of small box game jacket (usually game name)

col

Color of text/icons

size

Target box size. Either "4x6" or "poker".

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 by paste(collapse = "\n"), leading/trailing whitespace will be trimmed, any tab indentations will be unindented, and will be processed by marquee::marquee_glue().

icons

If TRUE include Creative Commons credits for Games-icons.net icons.

...

Ignored for now.

x, width

grid::unit() that will be passed to marquee::marquee_grob().

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 by marquee::marquee_glue().

style

A marquee style set object (e.g. from sbgjackets_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)

Value

A grid grob object

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)
}