Skip to contents

Create font format

Usage

create_font(
  b = "",
  charset = "",
  color = wb_color(hex = "FF000000"),
  condense = "",
  extend = "",
  family = "2",
  i = "",
  name = "Aptos Narrow",
  outline = "",
  scheme = "minor",
  shadow = "",
  strike = "",
  sz = "11",
  u = "",
  vert_align = "",
  ...
)

Arguments

b

bold

charset

charset

color

rgb color: default "FF000000"

condense

condense

extend

extend

family

font family: default "2"

i

italic

name

font name: default "Aptos Narrow"

outline

outline

scheme

font scheme: default "minor"

shadow

shadow

strike

strike

sz

font size: default "11",

u

underline

vert_align

vertical alignment

...

...

Examples

font <- create_font()
# openxml has the alpha value leading
hex8 <- unlist(xml_attr(read_xml(font), "font", "color"))
hex8 <- paste0("#", substr(hex8, 3, 8), substr(hex8, 1, 2))

# # write test color
# col <- crayon::make_style(col2rgb(hex8, alpha = TRUE))
# cat(col("Test"))