Skip to content

Commit

Permalink
FIX: Add 700 weight variant for Inter (#13)
Browse files Browse the repository at this point in the history
Followup  5be751e

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.
  • Loading branch information
martin-brennan authored Jan 20, 2025
1 parent cecc2dc commit d09fff8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/discourse_fonts.rb
Original file line number Diff line number Diff line change
@@ -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__)
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit d09fff8

Please sign in to comment.