cell_text() seems not to accept numeric values for weight (although the docs say it can). I understand that this doesn't apply to every font, but it seems like it's not getting passed the validation of the argument to begin with.
library(gt)
cell_text(weight = 400)
#> Error: The provided `weight` value cannot be `400`; it can only be either of the following:
#> * `"normal"`, `"bold"`, `"lighter"`, or `"bolder"`
Created on 2020-05-19 by the reprex package (v0.3.0)
Thanks for reporting this. There used to be the option to include the font-weight numbers but it was removed. This should be put back in, especially since some work is being done to include web fonts, most of which have quite a few weights.
Most helpful comment
Thanks for reporting this. There used to be the option to include the
font-weightnumbers but it was removed. This should be put back in, especially since some work is being done to include web fonts, most of which have quite a few weights.