if (FALSE) { # require("gdtools", quietly = TRUE, character.only = TRUE)
# automatic detection (requires gdtools)
gdtools::register_liberationsans()
doc <- read_docx()
doc <- docx_embed_font(doc, font_family = "Liberation Sans")
# # explicit paths (no gdtools needed)
# doc <- docx_embed_font(
# doc,
# font_family = "My Font",
# regular = "path/to/font-regular.ttf",
# bold = "path/to/font-bold.ttf"
# )
}
Run the code above in your browser using DataLab