-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,19 +17,21 @@ Authors@R: | |
email = "[email protected]"), | ||
person(family = "République Française", | ||
role = "cph"), | ||
person(family = "Production Type", | ||
person(family = "Production Type", | ||
role = "cph", | ||
comment = "Spectral typeface in inst/resources/fonts/spectral/files")) | ||
Description: Produce documents compliants with the French | ||
government design system. | ||
License: EUPL (>= 1.2) | file LICENCE | ||
URL: https://github.com/spyrales/gouvdown | ||
BugReports: https://github.com/spyrales/gouvdown/issues | ||
Imports: | ||
htmltools, | ||
utils, | ||
xfun | ||
Suggests: | ||
testthat | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.0 | ||
Imports: | ||
htmltools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(spectral_font_dep) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#' HTML dependencies for fonts used by the French government | ||
#' | ||
#' These functions provide common HTML dependencies for re-use by other R | ||
#' Markdown output formats or Shiny applications. | ||
#' | ||
#' @param use_gouvdown_fonts Do you prefer to use `gouvdown.fonts` dependencies? | ||
#' | ||
#' @return An object that can be included in a list of dependencies passed to | ||
#' [attachDependencies][htmltools::attachDependencies()]. | ||
#' | ||
#' @export | ||
#' @keywords internal | ||
#' | ||
#' @examples | ||
#' spectral_font_dep() | ||
spectral_font_dep <- function(use_gouvdown_fonts = TRUE) { | ||
if (isTRUE(use_gouvdown_fonts) && xfun::loadable("gouvdown.fonts")) { | ||
dep <- utils::getFromNamespace("html_dependency_spectral", "gouvdown.fonts") | ||
return(dep()) | ||
} | ||
|
||
htmltools::htmlDependency( | ||
"fontspectral", "v2.000", src = pkg_resource(), | ||
head = paste(readLines(pkg_resource("fonts", "spectral", "links.html")), collapse = "\n") | ||
) | ||
} | ||
|
||
|
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<link href="https://fonts.googleapis.com/css2?family=Spectral&display=swap" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css2?family=Spectral&display=swap" rel="stylesheet"> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.