Add custom heading and body font settings - #3975
Open
HarshankPatel9038 wants to merge 1 commit into
Open
Conversation
- Introduced new settings for custom heading and body fonts in settings_schema.json, allowing users to specify font family, URL, weight, and style. - Updated password.liquid and theme.liquid to conditionally load custom fonts based on user settings. - Created a new snippet, custom-fonts.liquid, to handle the loading of fonts from Google Fonts or direct WOFF2 URLs. - Added localization for new font settings in multiple languages. - Updated release notes to reflect the addition of custom font support.
Author
|
I have signed the CLA! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Adds optional custom heading and body font settings. Merchants can use either a Google Fonts stylesheet URL or a direct WOFF2 font URL without editing theme code.
Why are these changes introduced?
Dawn currently supports Shopify's font picker for typography. This change gives merchants an opt-in way to use custom brand fonts while preserving the existing font picker as the default experience.
What approach did you take?
custom-fontssnippet that:@font-facefor direct WOFF2 URLs.font-display: swap.theme.liquidandpassword.liquidso custom fonts apply consistently across the storefront and password page.Other considerations
Decision log
font-display: swapVisual impact on existing themes
None by default. Existing themes retain their current selected heading and body fonts. Custom fonts are applied only after a merchant enables the relevant setting.
Testing steps/scenarios
shopify theme check --path .Checklist