ids theme: use Fira Code for highlighted/code text
Loads Fira Code from Google Fonts (the monospaced Fira Sans variant the
IDS reference decks use) and sets it as --r-code-font, replacing the
generic monospace; falls back to Fira Mono (already imported via the
Mozilla CSS), then DejaVu Sans Mono. R's <- renders as an arrow glyph
via Fira Code's default ligatures.
Change-Id: I7b7eb8538042b2287973a6687c0e4f0565a21328
diff --git a/NEWS.md b/NEWS.md
index 40a6e95..95d1c42 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,7 @@
+# revealjs.ids (development version)
+
+- `ids` theme: highlighted/code text now uses Fira Code (the monospaced Fira Sans variant, loaded from Google Fonts), as in the IDS reference decks; falls back to Fira Mono, then DejaVu Sans Mono. Replaces the generic `monospace` default.
+
# revealjs.ids 0.9.1.9009
- Package renamed from `revealjs` to `revealjs.ids`, so the IDS corporate design edition can be installed alongside upstream rstudio/revealjs. Use it with `revealjs.ids::revealjs_presentation` in the R Markdown yaml header. Existing documents using `revealjs::revealjs_presentation` require upstream revealjs (or can be migrated by replacing the prefix).
diff --git a/inst/reveal.js-5.2.1/css/theme/source/ids.scss b/inst/reveal.js-5.2.1/css/theme/source/ids.scss
index 9791304..7144eeb 100644
--- a/inst/reveal.js-5.2.1/css/theme/source/ids.scss
+++ b/inst/reveal.js-5.2.1/css/theme/source/ids.scss
@@ -19,6 +19,10 @@
// decks get it from too); the others are kept for locally installed copies.
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@300;400;700;800&family=Fira+Sans:wght@200;300;400;700&family=Fira+Sans+Extra+Condensed:wght@300;700&display=swap');
@import url('https://code.cdn.mozilla.net/fonts/fira.css');
+// Fira Code: the monospaced Fira Sans variant for highlighted/code text (as
+// in the IDS reference decks; falls back to Fira Mono from the Mozilla CSS
+// above, then DejaVu Sans Mono)
+@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap');
@import url('https://korap.ids-mannheim.de/font/libertinus.css');
$idsOrange: #f6a800;
@@ -47,6 +51,9 @@
$listBulletColor: $idsOrange;
+// --r-code-font (template emits #{$codeFont} as-is)
+$codeFont: "Fira Code", "Fira Mono", "DejaVu Sans Mono", "Source Code Pro", monospace;
+
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
diff --git a/inst/reveal.js-5.2.1/dist/theme/ids.css b/inst/reveal.js-5.2.1/dist/theme/ids.css
index 08aafc8..b7879a9 100644
--- a/inst/reveal.js-5.2.1/dist/theme/ids.css
+++ b/inst/reveal.js-5.2.1/dist/theme/ids.css
@@ -5,6 +5,10 @@
*/
@import url("https://code.cdn.mozilla.net/fonts/fira.css");
@import url("https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@300;400;700;800&family=Fira+Sans:wght@200;300;400;700&family=Fira+Sans+Extra+Condensed:wght@300;700&display=swap");
+/* Fira Code: the monospaced Fira Sans variant for highlighted/code text
+ (as in the IDS reference decks; falls back to Fira Mono from the Mozilla
+ CSS above, then DejaVu Sans Mono) */
+@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap");
@import url("https://korap.ids-mannheim.de/font/libertinus.css");
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
@@ -33,7 +37,7 @@
--r-heading2-size: 1.35em;
--r-heading3-size: 0.9em;
--r-heading4-size: 0.7em;
- --r-code-font: monospace;
+ --r-code-font: "Fira Code", "Fira Mono", "DejaVu Sans Mono", "Source Code Pro", monospace;
--r-link-color: #2a76dd;
--r-link-color-dark: #1a53a1;
--r-link-color-hover: #6ca0e8;