Skip to content

Commit

Permalink
chore: i think it's ready
Browse files Browse the repository at this point in the history
  • Loading branch information
hrbrmstr committed Mar 3, 2024
1 parent 0ef1f1c commit 6417996
Show file tree
Hide file tree
Showing 55 changed files with 34 additions and 108 deletions.
7 changes: 2 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Authors@R: c(
person("Dan", "Wilson", email = "[email protected]",
role = c("ctb"), comment = c("Secondary axis support")),
person("Xavier", "Adam", role = c("ctb")),
person("Google", comment = "Roboto Condensed & Titillium Web Fonts",
role = c("cph")),
person("Google", comment = "Roboto Condensed", role = c("cph")),
person("IBM", comment = "Plex Sans Font", role = c("cph")),
person("Goldman Sachs", comment = "Goldman Sans Font", role = c("cph")),
person("Impallari Type", comment = "Public Sans Font", role = c("cph")),
Expand All @@ -24,9 +23,7 @@ Authors@R: c(
Maintainer: Bob Rudis <[email protected]>
Description: A compilation of extra 'ggplot2' themes, scales and utilities, including a
spell check function for plot label fields and an overall emphasis on typography.
A copy of the 'Google' font 'Roboto Condensed' is also included along with a copy
of the 'IBM' 'Plex Sans', and 'Public Sans' fonts
are also included to support their respective typography-oriented themes.
A copy of the 'Google' font 'Roboto Condensed' is also included.
Copyright: file inst/COPYRIGHTS
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down
18 changes: 6 additions & 12 deletions R/econ-sans.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy
#'
#' You should [import_econ_sans()] first and also install the fonts on your
#' You should [import_econ_sans()] first and install the fonts on your
#' system before trying to use this theme.
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
Expand Down Expand Up @@ -200,21 +200,15 @@ theme_ipsum_es <- function(
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @note This will take care of ensuring PDF/PostScript usage. The location of the
#' font directory is displayed after the base import is complete. It is highly
#' recommended that you install them on your system the same way you would any
#' other font you wish to use in other programs.
#' @export
import_econ_sans <- function() {

es_font_dir <- system.file("fonts", "econ-sans", package="hrbrthemes")
#
# suppressWarnings(suppressMessages(extrafont::font_import(es_font_dir, prompt=FALSE)))
#
# message(
# "You will likely need to install these fonts on your system as well.\n\n",
# "You can find them in [", es_font_dir, "]"
# )

message(
"You will need to install these fonts on your system as well.\n\n",
"You can find them in [", es_font_dir, "]"
)

}

Expand Down
18 changes: 6 additions & 12 deletions R/goldmansans.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy
#'
#' You should [import_goldman_sans()] first and also install the fonts on your
#' You should [import_goldman_sans()] first and install the fonts on your
#' system before trying to use this theme.
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
Expand Down Expand Up @@ -180,22 +180,16 @@ theme_ipsum_gs <- function(
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @note This will take care of ensuring PDF/PostScript usage. The location of the
#' font directory is displayed after the base import is complete. It is highly
#' recommended that you install them on your system the same way you would any
#' other font you wish to use in other programs.
#' @export
import_goldman_sans <- function() {

gs_font_dir <- system.file("fonts", "goldman-sans", package="hrbrthemes")

# suppressWarnings(suppressMessages(extrafont::font_import(gs_font_dir, prompt=FALSE)))
#
# message(
# sprintf(
# "You will likely need to install these fonts on your system as well.\n\nYou can find them in [%s]",
# gs_font_dir)
# )
message(
sprintf(
"You will need to install these fonts on your system as well.\n\nYou can find them in [%s]",
gs_font_dir)
)

}

Expand Down
18 changes: 4 additions & 14 deletions R/inter.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy
#'
#' You should [import_inter()] first and also install the fonts on your
#' You should [import_inter()] first and install the fonts on your
#' system before trying to use this theme.
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
Expand Down Expand Up @@ -174,30 +174,20 @@ theme_ipsum_inter <- function(

#' Import Inter font for use in charts
#'
#' Inter is Copyright (c) 2016-2020 The Inter Project Authors
#' (<https://rsms.me/inter/>).
#' Inter is Copyright (c) 2016-2024 The Inter Project Authors
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
#' call `extrafont::loadfonts()` to register non-core fonts with R PDF & PostScript
#' devices. If you are running under Windows, the package calls the same function
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @note This will take care of ensuring PDF/PostScript usage. The location of the
#' font directory is displayed after the base import is complete. It is highly
#' recommended that you install them on your system the same way you would any
#' other font you wish to use in other programs.
#' @export
import_inter <- function() {

inter_font_dir <- system.file("fonts", "inter", package="hrbrthemes")

suppressWarnings(suppressMessages(extrafont::font_import(inter_font_dir, prompt=FALSE)))

message(
sprintf(
"You will likely need to install these fonts on your system as well.\n\nYou can find them in [%s]",
inter_font_dir)
"You can find Inter at https://github.com/rsms/inter. Please install them ",
"and run extrafont::font_import()"
)

}
Expand Down
19 changes: 5 additions & 14 deletions R/plexsans.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy
#'
#' You should [import_plex_sans()] first and also install the fonts on your
#' You should [import_plex_sans()] first and install the fonts on your
#' system before trying to use this theme.
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
Expand Down Expand Up @@ -175,22 +175,13 @@ theme_ipsum_ps <- function(
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @note This will take care of ensuring PDF/PostScript usage. The location of the
#' font directory is displayed after the base import is complete. It is highly
#' recommended that you install them on your system the same way you would any
#' other font you wish to use in other programs.
#' @export
import_plex_sans <- function() {

ps_font_dir <- system.file("fonts", "plex-sans", package="hrbrthemes")

# suppressWarnings(suppressMessages(extrafont::font_import(ps_font_dir, prompt=FALSE)))
#
# message(
# sprintf(
# "You will likely need to install these fonts on your system as well.\n\nYou can find them in [%s]",
# ps_font_dir)
# )
message(
"You can find IBM Plex Sans at https://github.com/IBM/plex. Please install them ",
"and run extrafont::font_import()"
)

}

Expand Down
19 changes: 5 additions & 14 deletions R/public-sans.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy
#'
#' You should [import_public_sans()] first and also install the fonts on your
#' You should [import_public_sans()] first and install the fonts on your
#' system before trying to use this theme.
#'
#' There is an option `hrbrthemes.loadfonts` which -- if set to `TRUE` -- will
Expand Down Expand Up @@ -179,22 +179,13 @@ theme_ipsum_pub <- function(
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @note This will take care of ensuring PDF/PostScript usage. The location of the
#' font directory is displayed after the base import is complete. It is highly
#' recommended that you install them on your system the same way you would any
#' other font you wish to use in other programs.
#' @export
import_public_sans <- function() {

pub_font_dir <- system.file("fonts", "public-sans", package="hrbrthemes")

# suppressWarnings(suppressMessages(extrafont::font_import(pub_font_dir, prompt=FALSE)))
#
# message(
# sprintf(
# "You will likely need to install these fonts on your system as well.\n\nYou can find them in [%s]",
# pub_font_dir)
# )
message(
"You can find Public Sans at https://github.com/IBM/plex. Please install them ",
"and run extrafont::font_import()"
)

}

Expand Down
Binary file removed inst/fonts/inter/Inter-Black.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-BlackItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Bold.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-BoldItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-ExtraBold.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-ExtraBoldItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-ExtraLight.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-ExtraLightItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Italic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Light.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-LightItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Medium.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-MediumItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Regular.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-SemiBold.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-SemiBoldItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-Thin.ttf
Binary file not shown.
Binary file removed inst/fonts/inter/Inter-ThinItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Bold.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Light.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Medium.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Regular.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Text.ttf
Binary file not shown.
Binary file removed inst/fonts/plex-sans/IBMPlexSans-Thin.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Black.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-BlackItalic.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Bold.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-ExtraBold.ttf
Binary file not shown.
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-ExtraLight.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Light.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Medium.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Regular.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-SemiBold.ttf
Binary file not shown.
Binary file removed inst/fonts/public-sans/PublicSans-Thin.ttf
Binary file not shown.
Binary file removed inst/fonts/roboto-slab/RobotoSlab-Bold.ttf
Binary file not shown.
Binary file removed inst/fonts/roboto-slab/RobotoSlab-Light.ttf
Binary file not shown.
Binary file removed inst/fonts/roboto-slab/RobotoSlab-Regular.ttf
Binary file not shown.
Binary file removed inst/fonts/roboto-slab/RobotoSlab-Thin.ttf
Binary file not shown.
6 changes: 0 additions & 6 deletions man/import_econ_sans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/import_goldman_sans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/import_inter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/import_plex_sans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/import_public_sans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/theme_ipsum_es.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/theme_ipsum_gs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/theme_ipsum_inter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/theme_ipsum_ps.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/theme_ipsum_pub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6417996

Please sign in to comment.