Open gadenbuie opened 1 month ago
typography:
fonts:
- family: Open Sans
source: system
base: Open Sans
headings: Roboto Slab
monospace: Fira Code
headings: Roboto Slab
as a shortcut for headings: {family: "Roboto Slab"}
brand_yaml
(Shiny) will use Google Fonts by default, Quarto will use system.source: system
says "don't do anything to resolve this font".Quarto now uses the following schemas:
(other related schemas were similarly changed.)
brand_yaml
added BrandTypographyFontSystem
in https://github.com/posit-dev/brand-yaml/commit/f934ef99f807c91609c5204f62d33467a60f5040
And the default font source is now configurable via the BRAND_YAML_DEFAULT_FONT_SOURCE
envvar in 57fb01da367e4c262e05e43defdc1fd8e104d8cd and "system"
is the new default after #28.
As proposed by @cpsievert, we could make it very easy to set font families by letting
typography.{base,headings,monospace}
take a string that we'd map to thefamily
property.For someone who just wants to pick fonts quickly even this is still a bit of boilerplate. In pkgdown and rmarkdown, we've used a syntax like this to declare in-place Google fonts:
Instead of this, I wonder, if we're comfortable making Google Fonts the default, we could automatically add Google Font declarations for font families that don't have a counterpart in
typography.fonts
and are a single font family name.With this approach, in the following example we'd use Roboto Slab and Fira Code from Google Fonts but rely on locally-installed Open Sans (i.e. opting out of Google Fonts).