Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typography): properly pass Google font options #1825

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

saberzero1
Copy link
Collaborator

@saberzero1 saberzero1 commented Mar 12, 2025

Fixes typography configuration not properly handling FontSpecification.

// Examples:

// string only
typography: {
  header: "Schibsted Grotesk",
  ...
}

// FontSpecification with name, weights and italics
typography: {
  header: {
    name: "Schibsted Grotesk",
    weights: [400, 700],
    includeItalic: true,
  },
  ...
}

@saberzero1 saberzero1 marked this pull request as ready for review March 12, 2025 17:47
@saberzero1 saberzero1 requested a review from Copilot March 12, 2025 17:47

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the typography configuration to properly handle both string and FontSpecification values for Google font options.

  • Adds documentation for specifying fonts as either a string or a FontSpecification in docs/configuration.md
  • Updates the theme utility to correctly extract the font name from either type in quartz/util/theme.ts

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/configuration.md Adds a new section for specifying fonts with examples
quartz/util/theme.ts Updates font interpolations to use getFontSpecificationName for extracting font names
@saberzero1
Copy link
Collaborator Author

Good bot.

@jackyzha0 jackyzha0 merged commit 580c1bd into jackyzha0:v4 Mar 12, 2025
5 checks passed
@saberzero1 saberzero1 deleted the google-fonts-italics-fix branch March 13, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants