The bslib type definition apparently doesn’t have any effect on the source code section in the flexdashboard. But except the source code section, this definition is working fine.
I was using for tests a slightly modified example: ggplotly geoms.
The only real change I made was the YAML header:
---
title: "ggplotly geoms using custom fonts"
author: "(adapted from Carson Sievert)"
output:
flexdashboard::flex_dashboard:
orientation: rows
# social: menu
source_code: embed
theme:
version: 4
base_font: "Cambria"
code_font: "Cambria"
---
It is working on a windows machine as the Cambria (serif) font is included by default.
Note: a short code snippet was commented out starting with stuff <- ggplot_build(p) , but the next ggplotly(p) was kept.
On the other hand, after the bslib definitions are added to the YAML header, I am receiving a mysterious warning message, but the output was always created.
Output created: flexdashboard_ggplotly_custom.html
Warning message:
In file(con, "r") :
file("") only supports open = "w+" and open = "w+b": using the former