{"id":13857370,"url":"https://github.com/hrbrmstr/hrbragg","last_synced_at":"2025-09-03T02:42:28.052Z","repository":{"id":141238304,"uuid":"339302019","full_name":"hrbrmstr/hrbragg","owner":"hrbrmstr","description":"Typography-centric Themes, Theme Components, and Utilities for 'ggplot2' and 'ragg'.","archived":false,"fork":false,"pushed_at":"2022-02-01T14:33:38.000Z","size":6359,"stargazers_count":40,"open_issues_count":5,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-01T06:11:09.498Z","etag":null,"topics":["ggplot2","r","ragg","rstats","typography"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-02-16T06:09:01.000Z","updated_at":"2023-09-10T18:42:41.000Z","dependencies_parsed_at":"2024-02-09T01:57:22.798Z","dependency_job_id":null,"html_url":"https://github.com/hrbrmstr/hrbragg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhrbragg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhrbragg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhrbragg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhrbragg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/hrbragg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135909,"owners_count":20403798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ggplot2","r","ragg","rstats","typography"],"created_at":"2024-08-05T03:01:34.744Z","updated_at":"2025-03-21T12:30:56.560Z","avatar_url":"https://github.com/hrbrmstr.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: rmarkdown::github_document\neditor_options: \n  chunk_output_type: console\n---\n```{r pkg-knitr-opts, include=FALSE}\nhrbrpkghelpr::global_opts()\n```\n\n```{r ragg, echo = FALSE}\nknitr::opts_chunk$set(\n  dev = \"ragg_png\",\n  cache = TRUE\n)\n```\n\n```{r badges, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::stinking_badges()\n```\n\n```{r description, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::yank_title_and_description()\n```\n\n## What's Inside The Tin\n\nThe following functions are implemented:\n\n```{r ingredients, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::describe_ingredients()\n```\n\n## Installation\n\n```{r install-ex, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::install_block()\n```\n\n## Usage\n\n```{r lib-ex}\nlibrary(tibble)\nlibrary(hrbragg)\nlibrary(ggplot2)\n\n# current version\npackageVersion(\"hrbragg\")\n\n```\n\nFor the moment, you'll need to install Inter:\n\n```{r install-font, eval = FALSE}\ninstall_inter()\n```\n\n### Inspect the definitions of the feature codes:\n\n```{r ex-00}\nstr(inter_pkg, 1)\n\ndata(\"feature_dict\")\n\nfeature_dict[feature_dict$tag %in% textshaping::get_font_features(\"Inter\")[[1]],]\n```\n\n### Let's make a plot!\n\n```{r ex-01}\nggplot() +\n  geom_point(\n    data = mtcars,\n    aes(mpg, wt, color = factor(cyl))\n  ) +\n  geom_label(\n    aes(\n      x = 15, y = 5.48,\n      label = \"\u003c- A fairly useless annotation\\n       that uses the custom Inter\\n          variant by default.\"\n    ),\n    label.size = 0, hjust = 0, vjust = 1\n  ) +\n  labs(\n    x = \"Fuel efficiency (mpg)\", y = \"Weight (tons)\",\n    title = \"Seminal ggplot2 scatterplot example\",\n    subtitle = \"A plot that is only useful for demonstration purposes\",\n    caption = \"Brought to you by the letter 'g'\"\n  ) -\u003e gg1\n```\n\n### Dark \u0026 light mode support with just a parameter change!\n\n```{r dark-mode-01}\ngg1 + theme_inter(grid = \"XY\", mode = \"dark\") \n```\n\nNote the ligatures aren't as nice in Goldman Sans\n\n```{r dark-mode-01-rc}\ngg1 + theme_rc(grid = \"XY\", mode = \"dark\") \n```\n\n### Note the ligatures aren't as nice in or Roboto Condensed\n\n```{r dark-mode-01-gs}\ngg1 + theme_gs(grid = \"XY\", mode = \"dark\") \n```\n\n```{r light-mode-01}\ngg1 + theme_inter(grid = \"XY\", mode = \"light\") \n```\n\n```{r light-mode-01-rc}\ngg1 + theme_rc(grid = \"XY\", mode = \"light\") \n```\n\n```{r light-mode-01-gs}\ngg1 + theme_gs(grid = \"XY\", mode = \"light\") \n```\n\n### Making sure we got all the various plot components styled\n\n```{r ex-02}\nggplot() +\n  geom_point(\n    data = mpg,\n    aes(displ, hwy, color = trans)\n  ) +\n  facet_wrap(\n    vars(cyl, drv), scales = \"free\", drop = TRUE\n  ) +\n  labs(\n    x = \"Displacement\", y = \"Highway\",\n    title = \"Another seminal ggplot2 scatterplot example\",\n    subtitle = \"A plot that is only useful for demonstration purposes\",\n    caption = \"Brought to you by the letter 'g'\"\n  ) -\u003e gg2\n```\n\n```{r light-mode-02, fig.width=1400/96, fig.height=700/96}\ngg2 + theme_inter(grid = \"XY\", mode = \"light\") \n```\n\n```{r dark-mode-02, fig.width=1400/96, fig.height=700/96}\ngg2 + theme_inter(grid = \"XY\", mode = \"dark\") \n```\n\n### Here's a way to preview any variants you create:\n\n```{r preview-00, fig.width=600/96, fig.height=1300/96}\npreview_variant(inter_pkg)\n```\n\n```{r preview-01, fig.width=400/96, fig.height=300/96}\nreconfigure_font(\n  family = \"Trattatello\",\n  width = \"normal\",\n  ligatures = \"discretionary\",\n  calt = 1, tnum = 1, case = 1,\n  dlig = 1, kern = 1,\n  zero = 0, salt = 0\n) -\u003e trat\n\npreview_variant(trat)\n```\n\n```{r preview-02, fig.width=600/96, fig.height=1100/96}\nreconfigure_font(\n  family = \"Barlow\",\n  width = \"normal\",\n  ligatures = \"standard\",\n  tnum = 1, kern = 1\n) -\u003e barlow\n\npreview_variant(barlow)\n```\n\n## hrbragg Metrics\n\n```{r cloc, echo=FALSE}\ncloc::cloc_pkg_md()\n```\n\n## Code of Conduct\n\nPlease note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fhrbragg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fhrbragg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fhrbragg/lists"}