From 41fedf61a10888a89ac547503f7fcd636da57fc0 Mon Sep 17 00:00:00 2001 From: tilcreator <tilcreator@tc-j.de> Date: Wed, 16 Mar 2022 22:17:37 +0100 Subject: [PATCH] Add Genos --- flake.lock | 17 +++++++++++++++++ flake.nix | 9 +++++++-- src/index.html | 8 ++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index bf28b59..0a8b529 100644 --- a/flake.lock +++ b/flake.lock @@ -30,6 +30,22 @@ "type": "indirect" } }, + "genos": { + "flake": false, + "locked": { + "lastModified": 1633670043, + "narHash": "sha256-MxmI1QQlSzJcNihmikTIbbCW4SofvwOIFxzKSluJLQU=", + "owner": "googlefonts", + "repo": "genos", + "rev": "707181862a0fe1ceecc334bb54c63ea4377e95d8", + "type": "github" + }, + "original": { + "owner": "googlefonts", + "repo": "genos", + "type": "github" + } + }, "google_fonts": { "flake": false, "locked": { @@ -64,6 +80,7 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", + "genos": "genos", "google_fonts": "google_fonts", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 9bf0c97..c6dfe5b 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,13 @@ url = "github:google/fonts"; flake = false; }; + genos = { + url = "github:googlefonts/genos"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils, flake-compat, google_fonts }: + outputs = { self, nixpkgs, flake-utils, flake-compat, google_fonts, genos }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in rec { @@ -38,7 +42,8 @@ cp index.html $out/index.html cp ${opentype_js} $out/js/opentype.min.js cp ${favicon}/favicon.svg ${favicon}/favicon.png $out/img - cp ${google_fonts}/ufl/ubuntumono/UbuntuMono-Regular.ttf ${google_fonts}/ufl/ubuntu/Ubuntu-Regular.ttf ${google_fonts}/ufl/ubuntu/Ubuntu-Bold.ttf \ + cp ${google_fonts}/ufl/ubuntumono/UbuntuMono-Regular.ttf ${google_fonts}/ufl/ubuntu/Ubuntu-Regular.ttf \ + ${google_fonts}/ufl/ubuntu/Ubuntu-Bold.ttf ${genos}/fonts/ttf/Genos-Regular.ttf \ $out/font cp ${merged-font} $out/font/merged.otf ''; diff --git a/src/index.html b/src/index.html index 97536ef..51add7a 100644 --- a/src/index.html +++ b/src/index.html @@ -32,6 +32,12 @@ font-weight: regular; src: local('Ubuntu Mono'), url(font/UbuntuMono-Regular.ttf) format('truetype'); } + @font-face { + font-family: 'Genos'; + font-style: normal; + font-weight: regular; + src: url(font/Genos-Regular.ttf) format('truetype'); + } html { scroll-behavior: smooth; min-height: 100%; @@ -51,6 +57,8 @@ } h1 { color: #62C1A6; + font-family: Genos; + font-size: 3.7rem; } h2, h3 { margin: 10px 0px; -- GitLab