Skip to content

Commit 97b1d9e

Browse files
committed
fix CI install marianne bis
1 parent 66270b8 commit 97b1d9e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

12-creer-des-cartes-pour-le-web.Rmd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,17 @@ pop2015_epci_normands_geo <- fonds_carto_normands$epci %>%
203203

204204
On reprend notre carte ggplot normande en ronds proportionnels :
205205

206-
```{r}
207-
systemfonts::register_font(name = "Marianne light", system.file("resources/fonts/marianne/truetype/Marianne-Light.ttf", package = "gouvdown.fonts"))
208-
206+
```{r ggiraph with Marianne}
207+
# On vérifie que la police Marianne est correctement installée.
208+
verif_marianne_ok <- gouvdown::check_fonts_in_r(fonts = "Marianne")
209+
if(!verif_marianne_ok) {
210+
systemfonts::register_font(name = "Marianne light",
211+
system.file("resources/fonts/marianne/truetype/Marianne-Light.ttf",
212+
package = "gouvdown.fonts"))
213+
systemfonts::register_font(name = "Marianne",
214+
system.file("resources/fonts/marianne/truetype/Marianne-Regular.ttf",
215+
package = "gouvdown.fonts"))
216+
}
209217
carte_ronds_prop_dyn <- ggplot(data = pop2015_epci_normands_geo) +
210218
geom_sf_interactive(aes(tooltip = Zone)) +
211219
geom_sf_interactive(data = st_point_on_surface(pop2015_epci_normands_geo),

0 commit comments

Comments
 (0)