Parcourir la source

Set global or chunk fig.showtext = FALSE to keep from setting this option on load

For #36
tags/v0.4.0
Garrick Aden-Buie il y a 5 ans
Parent
révision
b271eaccb7
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. +4
    -1
      R/ggplot2.R

+ 4
- 1
R/ggplot2.R Voir le fichier

@@ -907,7 +907,10 @@ set_fig_showtext <- function() {
if (!requireNamespace("showtext", quietly = TRUE)) {
return(invisible())
}
curr_fst <- knitr::opts_chunk$get("fig.showtext")

curr_fst_chunk <- knitr::opts_current$get("fig.showtext")
curr_fst <- curr_fst_chunk %||% knitr::opts_chunk$get("fig.showtext")

if (!is.null(curr_fst) && identical(curr_fst, FALSE)) {
return(invisible())
}

Chargement…
Annuler
Enregistrer