Google Fonts request fails (HTTP 400) for variable fonts in font packs: `[email protected]` exceeds the fonts' axes

オープン
#3,353 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
html
領域
frontend

調査の方向性

Read layouts/_partials/functions/typography.html and the affected font pack definitions. Check how variable fonts are marked and how their Google Fonts URL is assembled; reproduce with the provided curl request. Done when the bundled variable fonts request valid axis ranges and the combined request no longer returns HTTP 400.

索引モデルが issue の本文から書いたものです。

説明

layouts/_partials/functions/typography.html requests every font marked variable: true with [email protected]. Google Fonts returns HTTP 400 when the requested range is outside the font's weight axis, and one invalid family fails the whole combined request, so no web fonts load and sites fall back to system fonts.

Affected bundled packs (tested 2026-10-21):

  • developer: Space Grotesk (300–700), Fira Code (300–700)
  • academic: Lora, Source Serif 4
  • editorial: Playfair Display
  • humanist: Nunito, Open Sans
  • modern: JetBrains Mono (Inter alone works)

Repro: curl -I "https://fonts.googleapis.com/css2?family=Space+Grotesk:[email protected]&display=swap" gives 400; with [email protected] it gives 200.

Suggested fix: store each variable font's axis range in the font pack (e.g. axes: {heading: "300..700"}) and use it instead of 100..900, or fall back to the static weights list.

Seen on kit [email protected].

主要言語
HTML
スター
9.8k
フォーク
2.9k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HugoBlox/kit のほかの issue

HugoBlox/kit の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。