Explorar el Código

Add preview of Cabin and Noto Sans fonts and typo fixes

tags/v0.3.0
Garrick Aden-Buie hace 6 años
padre
commit
86233be77f
Se han modificado 3 ficheros con 36 adiciones y 13 borrados
  1. +1
    -1
      man/fragments/_colors.Rmd
  2. +32
    -4
      man/fragments/_fonts.Rmd
  3. +3
    -8
      vignettes/xaringanthemer.Rmd

+ 1
- 1
man/fragments/_colors.Rmd Ver fichero



The `style*()` functions in xaringanthemer The `style*()` functions in xaringanthemer
include a `colors` argument that lets you include a `colors` argument that lets you
quickly define a additional colors to use in your slides.
quickly define additional colors to use in your slides.
This argument takes a vector of named colors This argument takes a vector of named colors


```r ```r

+ 32
- 4
man/fragments/_fonts.Rmd Ver fichero



[google-fonts]: https://fonts.google.com [google-fonts]: https://fonts.google.com


<link href="https://fonts.googleapis.com/css2?family=Cabin:wght@600&family=Noto+Sans&display=swap" rel="stylesheet">

```{css echo=FALSE}
.cabin {
font-family: Cabin;
font-weight: 600
}
.noto-sans {
font-family: 'Noto Sans';
}
.font-preview {
padding: 1em;
margin-top: 1em;
margin-bottom: 1em;
border: 1px solid #dddddd;
border-radius: 3px;
font-size: 1.25em;
}
```

### Default Fonts ### Default Fonts


**xaringanthemer** by default uses a different set of default fonts for heading and body fonts.
The new defaults use
The default heading and body fonts used in **xaringanthemer**
are different than the xaringan default fonts.
In xaringanthemer,
[Cabin](https://fonts.google.com/specimen/Cabin) [Cabin](https://fonts.google.com/specimen/Cabin)
for headings and
is used for headings and
[Noto Sans](https://fonts.google.com/specimen/Noto+Sans) [Noto Sans](https://fonts.google.com/specimen/Noto+Sans)
for body text.
for body text.

<div class="font-preview">
<p style="font-size: 1.5em" class="cabin">A Cabin in the Clearing</p>
<p class="noto-sans">Pack my box with five dozen liquor jugs. Amazingly few discotheques provide jukeboxes.</p>
</div>


These fonts are easier to read on screens and at a distance during presentations, These fonts are easier to read on screens and at a distance during presentations,
and they support a wide variety of languages and weights. and they support a wide variety of languages and weights.
Another reason for the change is that the xaringan (remarkjs) default body font, Another reason for the change is that the xaringan (remarkjs) default body font,

+ 3
- 8
vignettes/xaringanthemer.Rmd Ver fichero

[xaringan]: https://github.com/yihui/xaringan [xaringan]: https://github.com/yihui/xaringan
[remarkjs]: https://github.com/gnab/remark [remarkjs]: https://github.com/gnab/remark


```{r toc, results='asis', echo=FALSE, message=FALSE, eval=FALSE}
devtools::source_gist("c83e078bf8c81b035e32c3fc0cf04ee8", filename = 'render_toc.R')
x <- render_toc("README.Rmd", toc_depth = 3)
gsub(" -", "-", sub("^-.+?\n", "", x))
```

Jump to: Jump to:
[Quick Intro](#quick-intro), [Quick Intro](#quick-intro),
[Themes](#themes), [Themes](#themes),
[Theme Settings](#theme-settings), [Theme Settings](#theme-settings),
[Adding Custom CSS](#adding-custom-css),
[Fonts](#fonts)
[Fonts](#fonts),
[Colors](#colors),
[Adding Custom CSS](#adding-custom-css)


## Quick Intro ## Quick Intro



Cargando…
Cancelar
Guardar