summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcell Tóth <elfenermarcell@gmail.com>2025-04-21 08:22:28 +0200
committerValentin Gagarin <valentin@gagarin.work>2025-04-21 13:18:05 +0200
commitc11863f1e964833214b767f4a369c6e6a7aba141 (patch)
tree34a386cee9d6cfa82fd56c2b583a36831c415bde
parentdoc, documentation-highlighter: use variables & add dark mode (diff)
downloadnixpkgs-c11863f1e964833214b767f4a369c6e6a7aba141.tar.gz
doc, nixos/doc: include roboto font
Roboto was already set as the font for the manuals, but without a way to get it, so people who didn't happen to have it installed saw their default font
-rw-r--r--doc/doc-support/package.nix3
-rw-r--r--doc/style.css5
-rw-r--r--nixos/doc/manual/default.nix2
3 files changed, 10 insertions, 0 deletions
diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix
index d4b1d65b42b2..db8066c8dc56 100644
--- a/doc/doc-support/package.nix
+++ b/doc/doc-support/package.nix
@@ -13,6 +13,7 @@
writeShellScriptBin,
nixpkgs ? { },
markdown-code-runner,
+ roboto,
}:
stdenvNoCC.mkDerivation (
@@ -98,6 +99,8 @@ stdenvNoCC.mkDerivation (
mv out "$dest"
mv "$dest/index.html" "$dest/manual.html"
+ cp ${roboto.src}/web/Roboto\[ital\,wdth\,wght\].ttf "$dest/Roboto.ttf"
+
cp ${epub} "$dest/nixpkgs-manual.epub"
mkdir -p $out/nix-support/
diff --git a/doc/style.css b/doc/style.css
index ed8c453472fb..4ba76cc39114 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -486,3 +486,8 @@ div.appendix .variablelist .term {
font-weight: 400;
}
}
+
+@font-face {
+ font-family: Roboto;
+ src: url(Roboto.ttf);
+}
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 824b5eabb965..fd9f6761ac17 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -160,6 +160,8 @@ rec {
./manual.md \
$dst/${common.indexPath}
+ cp ${pkgs.roboto.src}/web/Roboto\[ital\,wdth\,wght\].ttf "$dst/Roboto.ttf"
+
mkdir -p $out/nix-support
echo "nix-build out $out" >> $out/nix-support/hydra-build-products
echo "doc manual $dst" >> $out/nix-support/hydra-build-products