The system_fonts() function

Use a subset of the sp500 dataset to create a gt table with 10 rows. For the date column and the column labels, let’s use a different font stack (the "industrial" one). The system fonts used in this particular stack are "Bahnschrift", "DIN Alternate", "Franklin Gothic Medium", and "Nimbus Sans Narrow" (the generic "sans-serif-condensed" and "sans-serif" are used if the aforementioned fonts aren’t available).

sp500 |>
  dplyr::slice(1:10) |>
  dplyr::select(-volume, -adj_close) |>
  gt() |>
  fmt_currency() |>
  tab_style(
    style = cell_text(
      font = system_fonts(name = "industrial"),
      size = px(18)
    ),
    locations = list(
      cells_body(columns = date),
      cells_column_labels()
    )
  )
date open high low close
2015-12-31 $2,060.59 $2,062.54 $2,043.62 $2,043.94
2015-12-30 $2,077.34 $2,077.34 $2,061.97 $2,063.36
2015-12-29 $2,060.54 $2,081.56 $2,060.54 $2,078.36
2015-12-28 $2,057.77 $2,057.77 $2,044.20 $2,056.50
2015-12-24 $2,063.52 $2,067.36 $2,058.73 $2,060.99
2015-12-23 $2,042.20 $2,064.73 $2,042.20 $2,064.29
2015-12-22 $2,023.15 $2,042.74 $2,020.49 $2,038.97
2015-12-21 $2,010.27 $2,022.90 $2,005.93 $2,021.15
2015-12-18 $2,040.81 $2,040.81 $2,005.33 $2,005.55
2015-12-17 $2,073.76 $2,076.37 $2,041.66 $2,041.89