From d09fff88677695c959e818633d8061d1574450c4 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Mon, 20 Jan 2025 16:15:55 +1000 Subject: [PATCH] FIX: Add 700 weight variant for Inter (#13) Followup 5be751e94674fe54f02d02d338cf89e820e584ca In the previous commit we added Inter as a font selection, but at the time since it was variable weight we didn't add a 700 weight variant out of concern for other issues that may arise from this. However leaving it out has had actual real-world issues, whether the bold variation does not render correctly in some browsers (e.g. Chrome on macOS). Adding the 700 weight here fixes that issue. --- lib/discourse_fonts.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/discourse_fonts.rb b/lib/discourse_fonts.rb index a5fd4c6..5f82f20 100644 --- a/lib/discourse_fonts.rb +++ b/lib/discourse_fonts.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module DiscourseFonts - VERSION = "0.0.12" + VERSION = "0.0.13" def self.path_for_fonts File.expand_path("../../vendor/assets/fonts", __FILE__) @@ -55,7 +55,11 @@ def self.fonts { name: "Inter", stack: "Inter, Arial, sans-serif", - variants: [{ filename: "Inter.ttf", format: "truetype", weight: 400 }] + # Inter is variable font, so the same .ttf file is used for all weights. + variants: [ + { filename: "Inter.ttf", format: "truetype", weight: 400 }, + { filename: "Inter.ttf", format: "truetype", weight: 700 } + ] }, { name: "NotoSansJP",